Facebook上的简单共享代码错误OAuthException 104

问题描述 投票:0回答:1

我有一个php网站,在facebook和Sharethis按钮和脚本上共享代码。 head标记包含fb:app_id,og:title,og:url,og:image但是调试URL会显示以下错误

  {
   "error": {
   "message": "An access token is required to request this resource.",
   "type": "OAuthException",
   "code": 104,
   "fbtrace_id": "GO7opPlWLTI"
   }
 }

调试页面显示此错误

fb:app_id hasn't been included in the meta tags. Specify the app ID so that stories shared 
to Facebook will be properly attributed to the app. Alternatively, app_id can be set in url 
when open the share dialog. Otherwise, the default app id( 966242223397117 ) will be assigned

当我使用图形显示Facebook获取的页面时,我根本找不到头标记。在PHP中它包含在每个页面中,我的页面的源代码没有错误。

php facebook-graph-api sharing facebook-social-plugins
1个回答
0
投票

转到以下页面:https://www.facebook.com/insights

然后使用“创建应用”和“添加域”按钮生成您网站的应用ID,以便将其包含在网页上的元标记中。

<meta property="fb:admins" content="xxxxxxxx" />
<meta property="fb:app_id" content="yyyyyyyy" /> 
© www.soinside.com 2019 - 2024. All rights reserved.