Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup facebook stream api

I'm currently investigating the possibilities of the facebook (and twitter) streaming api. I read the docs but after doing many google searches I still can't figure out how to get a realtime stream from facebook.

If I know it correctly, facebook let's you subscribe to a stream. When there are new updates facebook does a post request to your callback server and let's you handle that information.

I already found a callback example on the facebook github page. But how do I subscribe to a stream?

And is it possible for one registered facebook app to have multiple users connected to it?

Thanks in advance.

like image 473
frietkot Avatar asked Oct 13 '22 18:10

frietkot


1 Answers

You can find sample applications here that show you how to subscribe to a stream. https://github.com/facebook/real-time/tree/master/samples

Yes, you can have multiple users of your one app id. Be sure to pay attention to the uid of each entry in the array of data your callback server receives. See the "Change Notifications" section of https://developers.facebook.com/docs/reference/api/realtime/

like image 108
DMCS Avatar answered Oct 20 '22 09:10

DMCS