Facebook & Twitter Help

Does anyone know if there is a way to pull the last X amount of tweets or post from a facebook page into an app, if so would you happen to have a sample code?
[import]uid: 131530 topic_id: 34292 reply_id: 334292[/import]

Looks like you accidentally double posted this. I’ve removed the other and we an start the discussion here.

For facebook you would use the “me/feed” Graph API Call, something like:

facebook.request(“me/home”)

and in your facebook call back handler you setup when you initialized it, you would put the code to do something with the result when you were done.

For twitter its the “statuses/home_timeline”. Here’s the docs for that:

https://dev.twitter.com/docs/api/1.1/get/statuses/home_timeline

In both cases, you make the call (for Twitter, you probably would use network.request() since most of the samples we have are for sending tweets not reading them) to the API and you get back JSON data that you would need to json.decode() into a Lua table and then process from there.

[import]uid: 199310 topic_id: 34292 reply_id: 136365[/import]

Looks like you accidentally double posted this. I’ve removed the other and we an start the discussion here.

For facebook you would use the “me/feed” Graph API Call, something like:

facebook.request(“me/home”)

and in your facebook call back handler you setup when you initialized it, you would put the code to do something with the result when you were done.

For twitter its the “statuses/home_timeline”. Here’s the docs for that:

https://dev.twitter.com/docs/api/1.1/get/statuses/home_timeline

In both cases, you make the call (for Twitter, you probably would use network.request() since most of the samples we have are for sending tweets not reading them) to the API and you get back JSON data that you would need to json.decode() into a Lua table and then process from there.

[import]uid: 199310 topic_id: 34292 reply_id: 136365[/import]