2
一切正常工作與測試用戶,但是當我發佈我的應用程序和用戶點擊應用程序權限彈出對話框不會出現。我想有一些oauth問題,但不確定。請幫助我Facebook應用程序不會彈出權限
require 'facebook-files/facebook.php';
$app_id='xxxxxxxxxx';
$secret='xxxxxxxxxxxxx';
$facebook = new Facebook(array(
'appId' => $app_id,
'secret' => $secret,
'cookie'=> true,
'grant_type' => 'client_credentials'
));
// Get User ID
$user = $facebook->getUser();
if ($user) {
try {
//$access_token = $facebook->getAccessToken();
// Proceed knowing you have a logged in user who's authenticated.
$user_profile = $facebook->api('/me');
$friends = $facebook->api('/me/friends?fields=id,name,birthday,picture');
$event = $facebook->api('/me/?fields=events.fields(id,name)');
} catch (FacebookApiException $e) {
echo "Exception".error_log($e);
$user = null;
exit;
}
}
// Login or logout url will be needed depending on current user state.
if ($user) {
$logoutUrl = $facebook->getLogoutUrl();
} else {
$loginUrl = $facebook->getLoginUrl(array(
'scope' => 'read_stream,publish_actions,publish_stream,user_birthday,friends_birthday', 'display'=>'popup')
);
}
只要確保...但你的彈出式窗口攔截器是禁用的權利?如果您啓用了彈出式窗口攔截器,則會阻止權限窗口。 –
我沒有任何彈出式窗口攔截器 – user3300206