how to get facebook apprequest receiver user id
<a onclick="facebook_invitess_users(); return false;" href="#" class="link2">click here</a>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({appId: 'your_appid', status: true, cookie: true, xfbml: true});
};
FB.init({appId: 'your_appid', status: true, cookie: true, xfbml: true});
var facebook_invitess_users = function() {
FB.ui(
{
method: 'apprequests',
message: rebuild,
data: 'tracking information for the user',
title: 'Choose the friends you would like to invite',
},
function(response) {
jQuery.post(
"submit_url",
{request_ids: response.request_ids},
function(data) { alert(data); },
"html"
);
}
);
}
</script>
submit url php file code
<?php
if(isset($_REQUEST['request_ids'])) {
$sent = $_REQUEST['request_ids']; //Convert csv to array
$count = count($sent); //count how many objects in array
$appid = 'facebook_app_id';
$secret = 'facebook_app_secrct';
$app_token = file_get_contents('https://graph.facebook.com/oauth/access_token?client_id='.$appid.'&client_secret='.$secret.'&grant_type=client_credentials');
//Get application token
for ($a = 0; $a < $count; $a++) {
$request = file_get_contents('https://graph.facebook.com/'.$sent[$a].'?'.$app_token);
print_r($request); // This will output like below
$arr = json_decode($request);
var_dump($arr);
print_r($arr->to->name);
print_r($arr->to->id);
}
}
?>
Freelance Web Programmer, Android, Php 5, java, MySql, JQuery, Symfony framework, Smarty template, facebook application, googlemap application
Showing posts with label Facebook app request receiver user id. Show all posts
Showing posts with label Facebook app request receiver user id. Show all posts
Friday, February 18, 2011
Subscribe to:
Posts (Atom)
how to see xml preview in browser php
xml preview view in browser $xml = new DOMDocument('1.0', 'UTF-8'); $xml->preserveWhiteSpace = false; ...
-
Weather In Summer: 33.8 C (Max) - 23.3 C (Min) In winter: 20.3 C (Max) - 0 C (Min) Rainy Season : from July to Mid Sept, and very humid (Upt...
-
Open oracle virtual machine Open file preferences Click on left panel network Open tab host only network Right click on vboxnet0 Open d...
-
Android Studio menu -> tools -> Android -> Android Device Monitor open window dialog select Emulator Control Telephony Act...