Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get real-time status notification with Facebook SDK via listener

I'm using Twitter4j and the Android Facebook SDK to fetch status messages. With Twitter4J I get real-time notifications whenever a new status has been added to the stream via StatusListener (Twitter4J). In the Facebook SDK I cannot find a similar way, I can only fetch entire streams over and over again in a fixed time interval using RequestListener (Facebook SDK) as far as I see it.

Is there any way to get notified of new statuses in realtime with the Facebook SDK in a similar way as with Twitter4J?

(Found a similar but unanswered question here: Facebook real-time updated application wall)

like image 290
Mathias Conradt Avatar asked Dec 21 '10 05:12

Mathias Conradt


People also ask

How does the init Facebook SDK function work?

The init Facebook SDK function is called from the index.js file which waits for the returned Promise to be resolved before starting the React app.

How to use the Facebook SDK in react app?

React + Facebook - How to use the Facebook SDK in a React App 1 Init the Facebook SDK in a React App Before Startup. The below initFacebookSdk () function runs before the React app starts up to load and initialize the Facebook SDK, and ... 2 Example React Index.js Startup File. ... 3 Use the Facebook SDK in your React App! ...

What can I do with the Facebook SDK for Android?

The Facebook SDK for Android gives you access to the following features: Facebook Login — A secure and convenient way for people to log into your app or website by using their Facebook credentials. Sharing — Enable people to post to Facebook from your app.

Why am I not receiving webhook notifications for my App?

the object that owns the data has granted your app permission to access that data (e.g., a User allowing your app to access their Feed) Apps in development mode will not receive live webhooks notifications. While an app is in development mode, only test notifications initiated through the app dashboard will be sent.


1 Answers

There is a realtime API

http://developers.facebook.com/docs/api/realtime

but it's only for server-to-server communication, so it's not really useful if all you have is a mobile app without a server infrastructure that your app can subscribed to - which is what I was looking for in my particular case.

See the Q&A at http://forum.developers.facebook.net/viewtopic.php?id=56610

like image 136
Mathias Conradt Avatar answered Oct 25 '22 05:10

Mathias Conradt