tags:

views:

358

answers:

5

Hi all, I've been stomping at this all day :(

I want to display a status feed of both twitter and facebook on my website. For twitter, this is not a problem, as my account is public, I can easily get the feed. Facebook however, is a whole different story! I can't seem to find an easy way to just get my last status updates and display it on my website. The code I currently have, needs authentication of the visitor, and I don't want that!

This is my current code:

$facebook = new Facebook($api_key, $secret);
$stream = $facebook->api_client->fql_query("SELECT message,source,time FROM status WHERE uid = $user_id LIMIT 6");

I've seen several possible solutions, including the RSS feed, but as Facebook keeps changing the way their site works, none of the previous methods I've seen (including those from as late as januari) currently work!

Is there anybody who can provide me with a currently working solution to this (simple?) problem?

A: 

"The code I currently have, needs authentication of the visitor..."

Can you host a proxy page or service that accepts anonymous requests from your visitors then makes an authenticated request on their behalf?

Athens
I could, by would facebook allow me to do such a thing?
Pascal
If its your status that you are displaying and its your credentials that you are using to authenticate then i would be shocked if you would be violating terms of service. Also, as far as FB knows, you are making a request from one source IP (IP of your proxy) so there should be no reason to be alarmed from their perspective. Check their developer guides/docs but im sure this would work without violating any TOS
Athens
A: 

Any further information on this? I'm also trying to find out if it's possible to pull in Facebook status updates into our clients site.

Mark McDonnell
I solved it and you can take a look at the symfony plugin I madeL http://github.com/pascaldevink/usSocialMediaPlugin
Pascal
A: 

You deffinitely need to utilize the authorization before accessing any information of any of friends you may have. That is how Facebook works, it is not as open as Buzz or Twitter.

MilanAleksic
A: 

I figured out how to do this using the offline access feature in facebook. Take a look at the symfony plugin I created for this: http://github.com/pascaldevink/usSocialMediaPlugin

Pascal
A: 

Pascal I have been trying to use your plugin - I'm sure it's great, but I can't figure out how to use it. The documentation makes no sense to me.

Lauren
I've given the plugin an update yesterday and hope that the README is now more clear and usable. Please add an issue to the github page if anything is still unclear.
Pascal