[CONF] Apache Camel > Facebook

2014-08-15 Thread willem jiang (Confluence)














  


willem jiang edited the page:
 


Facebook   






...



 Code Block




 	from("facebook://home?consumer.delay=55000")
		.to("bean:blah");
 



Searching using a producer with dynamic options from header.
...






 View Online  · Like  · View Changes  
 Stop watching space  · Manage Notifications  


 


 


  This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software  






[CONF] Apache Camel > Facebook

2014-08-11 Thread willem jiang (Confluence)














  


willem jiang edited the page:
 


Facebook   




 Comment: CAMEL-7674 


...
Maven users will need to add the following dependency to their pom.xml for this component:



 Code Block




 

	
	org.apache.camel
	camel-facebook
	${camel-version}
	
 



URI format



 Code Block




 
 facebook://[endpoint]?[options]
 



...
Producer endpoints can also use a special option *inBody* that in turn should contain the name of the endpoint option whose value will be contained in the Camel Exchange In message. For example, the facebook endpoint in the following route retrieves activities for the user id value in the incoming message body.



 Code Block




 

	from("direct:test").to("facebook://activities?inBody=userId")...
 



...
Any of the producer endpoints that take a reading reading#reading parameter can be used as a consumer endpoint. The polling consumer uses the since and until fields to get responses within the polling interval. In addition to other reading fields, an initial since value can be provided in the endpoint for the first poll.
...
The reading option of type facebook4j.Reading adds support for reading parameters, which allow selecting specific fields, limits the number of results, etc. For more information see Graph APIAPI#reading - Facebook Developers.
It is also used by