tags:

views:

1363

answers:

2

For starters I hope facebook API burns in hell, in other news.

I'm trying to get a uid for which I need a session for a session I need to pass call_id sig. Which I have no clue how to get.

I'm following http://wiki.developers.facebook.com/index.php/Users.hasAppPermission which does not give a single example code with it.

Can someone please tell me a simple way to get uid so I can find if he/she has given me publishing permissions?

A: 

Has app permission was giving me trouble, so I got that in python/django on the server side adn then moved the flash.

Fahim Akhter
A: 

Hi, I ran into the same issue. After some poking around, here is what worked for me ...

  1. When they talk about the REST API, from the PHP perspective at least - they are talking about the facebook_client library.

  2. And then from your PHP file, you would add this to the top of the file, to use the REST API:

    require_once '/facebook_client/facebook.php';

  3. And then here's what you need to check the 'create-event' permission:

    $facebook = new Facebook($appapikey, $appsecret);

    $user_id = $facebook->require_login();

    $perm = $facebook->api_client->users_hasAppPermission('create_event');

    The return value is true or false. Do a search on google for 'FB.ApiClient.users_hasAppPermission' to get the API docs - they will only let me post one link today.

    Note that the permission names are the names you use with the <fb:prompt-permission FBML tag.

Gene Boris
Thanks that works too :D Though I made a fbml if else statment piece which did it for me :)
Fahim Akhter

related questions