i have:
Is somehow possible to get if user is application administrator in facebook with this in my hands?
Facebook API is a bundle of solutions used as a primary way to get data in and out of the platform. It enables developers and app users to access the functionality of this network: user information, photos and videos, messages and more.
You can get user data by using the Facebook Graph API if the user has given their permission to share their data and your app has the appropriate permissions to receive this data. This topic shows you how to make a single request for data and how to have a batch of requests in a single request.
The simplest way to get a copy of the User Profile object is to access the /me endpoint: FB. api('/me', function(response) { }); This will this will return the users name and an ID by default.
To get this kind of information you can use FQL:
protected function authorizeByFb(){
$result = $this->fb->api(array(
'method' => 'fql.query',
'query' => "SELECT developer_id FROM developer WHERE application_id='{$appId}' AND developer_id='{$fbUserId}'",
));
if(count($result)==1){
return true;
}
return false;
}
if your developed application is checking the role of the logged in facebook user or simply your application wants to recognize it's owner or admin, then http://developers.facebook.com/tools/explorer/?method=GET&path=me%2Faccounts should have that application id listed
FB.api('/me/accounts', 'get', {"access_token":access_token}, function(response){
//loop through response to check any application id matches current application id
});
{
"name": "app_name",
"access_token": "current_token_here",
"category": "Application",
"id": "your_owned_app_id"
},
{
"name": "app_name1",
"access_token": "current_token_here",
"category": "Application",
"id": "your_owned_app1_id"
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With