CloudSole Feed is a open REST endpoint for you to use in testing, debugging, just displaying data from any system. This is a easy way to POST a quick message to my Twitter style message board. Feel free to play with the sample code snippets below and to see how you can insert a message from to and from Salesforce, Java and curl. Clone on github: git clone https://github.com/thysmichels/cloudsole-hibernate-rest-salesforce-feed.git

Post from curl:
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d 
'{"name": "I love Cloudsole Salesforce Feed", "message": "This is awesome I can post my message on the public feed"}' 
http://cloudsole-feed.herokuapp.com/sfdc/public/feed
Outbound Apex
Admin: Please add http://cloudsole-feed.herokuapp.com 
to you Remote Site Details
Apex Code:
public with sharing class HttpCalloutToFeed 
{
  public static void sentMessageToFeed()
  { 
  	Http http = new Http();
  	HttpRequest httpreq = new HttpRequest(); 
  	httpreq.setEndpoint('http://cloudsole-feed.herokuapp.com/sfdc/public/feed'); 
  	String message = '{"name": "Message from ' + UserInfo.getFirstName() + '", "message": "My Organization ' + UserInfo.getOrganizationName() + ' located in ' + UserInfo.getLocale() + ' loves CloudSole public feed"}';
  	httpreq.setHeader('Accept', 'application/json');
  	httpreq.setHeader('Content-type', 'application/json');
  	httpreq.setBody(message);
  	httpreq.setMethod('POST');
  	HttpResponse response = http.send(httpreq); 
  	System.debug(response.getBody());
  } 
}
Inbound Apex
@RestResource(urlMapping='/feed/*')
global with sharing class RestFeedInbound 
{    
	@HttpGet 
    global static FeedItem newFeedEntry()
    {
    	FeedItem newChatterFeedItem = new FeedItem(
        Title=RestContext.request.params.get('title'),
        Body=RestContext.request.params.get('message'),
        ParentId=UserInfo.getUserId());
        
        insert newChatterFeedItem;
        
        FeedItem returnFeedItem = [Select Title, Body from FeedItem where Id=:newChatterFeedItem.Id];
        return returnFeedItem ;
    }
}
Get Access Token:
curl https://login.salesforce.com/services/oauth2/token -d  "grant_type=password" -d "client_id=YOURCLIENTID" -d "client_secret=YOURCLIENTSECRET" -d "username=YOURUSERNAME" -d "password=YOURPASSWORD+SECURITYTOKEN"
Invoke Inbound Apex:
curl 'https://YOURINSTANCE.salesforce.com/services/apexrest/feed?title=CloudSoleChatterTitle&message=CloudSoleInboundApexChatterMessage' -H 'Authorization: Bearer YOURACCESSTOKEN'
Call from Java:
package com.thysmichels.main;

import java.io.IOException;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;

public class CloudSoleFeedMain {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		HttpClient client = new DefaultHttpClient();
	    HttpPost post = new HttpPost("http://cloudsole-feed.herokuapp.com/sfdc/public/feed");
	   
	    try {
	    post.setEntity(new StringEntity("{\"name\": \"Message from Java Class\", \"message\": \"This is awesome I can post my message on the public feed\"}"));
	    post.setHeader("Accept", "application/json");
	    post.setHeader("Content-Type", "application/json");
	    HttpResponse response = client.execute(post);
	  
	    } catch (IOException e) {
	      e.printStackTrace();
	    }
	}
}