facebook-graph-api

How do I order the friends list returned from the new Facebook Graph API?

You can get a list of friends of an authenticated user with: https://graph.facebook.com/me/friends Anyone have any idea how to order the list by user name? Because it doesn't by default. There's nothing in the documentation. ...

Facebook Graph API authentication in canvas app and track session

Short question is: how can i use graph api oauth redirects mechanism to authenticate user and save retrieved access_token and also use javascript SDK when needed (the problem is javascript SDK will have different access_token when initialized). I have initially setup my facebook iframe canvas app, with single sign on. This works well wi...

Add a wall post to a page or application wall as page or application with facebook graph API

Hi, I wan't to create a new wall post on a appliaction page or a "normal" page with the facebook graph API. Is there a way to "post as page"? With the old REST-API it worked like this: $facebook->api_client->stream_publish($message, NULL, $links, $targetPageId, $asPageId); So, if I passed equal IDs for $targetPageId and $asPageId I w...

How to integrate Facebook the new Graph Api with Authlogic in Ruby on Rails?

I've began with a new project using Authlogic system for Authorization. And I'm now wondering how could I connect Facebook oAuth sessions with my Authlogic session! First of all I want to use and Authlogic-oAuth Gems/Plugins, I what I want to use are just http://github.com/intridea/oauth2 and the interesting http://github.com/nsanta/...

Facebook Graph API - likes returns me an empty set...

When I try to get all my "likes" (formerly fan pages) on Facebook Graph API, sometimes it returns me an empty set: { "data": [ ] } I tried with https://graph.facebook.com/me/likes?access_token=MY_ACCESS_TOKEN and with graph.facebook.com/vinch/likes?access_token=MY_ACCESS_TOKEN but the result is exactly the same (empty). Any id...

Can I access an age-restricted Page's wall feed through the Facebook API?

I'm currently working on a website for an alcohol brand, and they want to display posts form their Facebook wall on their own website. Naturally they have restricted their Facebook page to 18+, but this means that the wall feed is not publically available, and also not accessible via http://graph.facebook.com/(page_id)/feed Is it poss...

how to get a page owner feeds by facebook graph API

hello i'm trying to get a facebook page feeds using graph URL. but i want to get only the owner data ... i don't want anything not from the owner. i can do that using PHP. but i'm asking if i can do that using the same graph request. Thanks ...

How can I display the users profile pic using the facebook graph api?

Hi, I would like to display the users profile picture inside of my applications canvas page, is there a way to do that using the graph api? I know I can do it using FBML but I would also like to pass the profile pic to a flash game I am making, so I would have to get the profile pic from the api and send it as a variable, here is the co...

Embedding flash into a facebook iframe canvas

Hi guys, I would like to embed a flash file into my facebook iframe canvas, I am using the PHP sdk, here is my code, echo "<fb:swf swfsrc=\"http://my.site.com/facebook-test/the_file.swf\" width=\"760\" height=\"710\" />"; I have tried everything but it still doesn't seem to want to display. Thanx in advance! ...

How can I tag a user in a photo using the Facebook Graph API?

I tried: $args = array( 'access_token' => $access_token, 'id' => $uid ); $url = "https://graph.facebook.com/{$idPhoto}/tags"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOP...

Uploading a picture to facebook

Hi guys, I am trying to upload a image to a gallery on a facebook fan page, here is my code thus far, $ch = curl_init(); $data = array('type' => 'client_cred', 'client_id' => 'app_id','client_secret'=>'secret_key',' redirect_uri'=>'http://apps.facebook.com/my-application/'); // your connect url here curl_setopt($ch, CU...

Uploading Photos without album-id using facebook-graph-api

When I use the facebook Graph API to upload a photo it seems as if I have to specify which photo album to upload to. When using the old graph api, if I didn't specify an album, an album specify to my application would be created on the user's behalf and the photo would upload to there. (ie. 'Super App Photos'). Can I get this same beh...

How to I post to Facebook user's news stream using the new PHP Graph API SDK?

I have seen example code in javascript for updating a user's newstream but I want to do it automatically from my php webapp when a certain event occurs - In javascript you would use the stream.publish method. I see no examples anywhere for the php graph api library though? ...

'Like' a page using facebook graph api

Using the graph api I'd like to be able to have an authorized user "like" a page. I tried posting the following: https://graph.facebook.com/${PAGE_ID}/likes?access_token=${ACCESS_TOKEN} And I get http error 500 accompanied by "Invalid post_id parameter" in the json response body. Looks like the "/likes" resource is suited to liking a ...

Problem while executing Facebook query

Hi , I am trying to run a FQL for the first time. This is the code I have included in my index.php file: <?php $query="SELECT message FROM status WHERE uid = 544337058";echo $query; ?> <?php include_once ('facebook.php'); $api_key = 'XXXXXXXXXXXXXXX'; $secret = 'XXXXXXXXXXXXXXXXX'; global $facebook; ...

Facebook graph API and post-remove callback with the new Graph SDKs (PHP)

I can't find any documentation in the new Facebook Graph/Authorization API documentation about how to handle post-remove callbacks from the Facebook server. With the REST API, this page described how to handle this. Any ideas on how to do this with the new PHP SDK? Do we need to do the signature verification ourselves? What's the equi...

get face book fan pages

i need to get the face book pages created by one user ...

Facebook Graph API, extended permissions

I am trying to use facebook Graph API, to update a users staus message. I am getting the following error while using it, I think the new graph sdk is not being properly referenced ? Notice: Undefined property: Facebook::$api_client in /users/home/aafhe7vh/web/public/update.php on line 9 Fatal error: Call to a member function users_h...

facebook GraphAPI post with Profile picture link

Hi, using the Graph API I try to create a post - including a users picture. In the documentation I found: - you can get the elements picture with http://graph.facebook.com/XXXXXXX/picture - where XXXX is the id of the object (user). And ...image src='http://graph.facebook.com/XXXXXXX/picture'... works fine. My problem now - I try to c...

Set Facebook Status with Facebook Graph API??

Hello. I would like to know how to set my status using the Facebook Graph API and PHP, may be with the CURL function?? Thanks!! ...