|
@@ -15,7 +15,7 @@ class FacebookService implements SmmPlatformInterface
|
|
|
$this->fb = new Facebook([
|
|
|
'app_id' => env('SSM_FACEBOOK_APP_ID'), // 替换为您的App ID
|
|
|
'app_secret' => env('SSM_FACEBOOK_APP_SECRET'), // 替换为您的App Secret
|
|
|
- 'default_graph_version' => 'v12.0', // 使用当前版本
|
|
|
+ 'default_graph_version' => 'v22.0', // 使用当前版本
|
|
|
]);
|
|
|
//$this->pageAccessToken = $pageAccessToken;
|
|
|
}
|
|
@@ -28,9 +28,9 @@ class FacebookService implements SmmPlatformInterface
|
|
|
{
|
|
|
// 实现Facebook登录逻辑
|
|
|
$helper = $this->fb->getRedirectLoginHelper();
|
|
|
- $permissions = ['publish_pages'];
|
|
|
+ $permissions = ['public_profile','email'];
|
|
|
$distSiteUrl = env('DIST_SITE_URL');
|
|
|
- $loginUrl = $helper->getLoginUrl($distSiteUrl.'/callback/facebook', $permissions);
|
|
|
+ $loginUrl = $helper->getLoginUrl('https://internal-dist.mietubl.com.cn/callback/facebook', $permissions);
|
|
|
return ['status'=>true, 'data' => ['url'=>$loginUrl]];
|
|
|
}
|
|
|
|