Facebook opengraph open graph(#15)必须使用app access_令牌调用此方法。然后2500

Facebook opengraph open graph(#15)必须使用app access_令牌调用此方法。然后2500,facebook-opengraph,Facebook Opengraph,我正试图在Facebook上发布一个新的open graph动作,但我似乎无法获得正确的访问令牌。我尝试了应用程序和用户令牌。每次错误告诉我使用另一个 我实际上使用的是django_facebook,但对于这个例子,我只使用原始http。(顺便说一句,这些应用程序ID/机密都是假的,无需编辑。) 对于这个例子,我有一个正常工作的开放图形对象,叫做“升级”,我在上面运行了调试器,一切都很好。它在这样一个网站上工作:然后我有一个新的开放图形动作类型(为了举例),叫做myaction,我已经在Face

我正试图在Facebook上发布一个新的open graph动作,但我似乎无法获得正确的访问令牌。我尝试了应用程序和用户令牌。每次错误告诉我使用另一个

我实际上使用的是django_facebook,但对于这个例子,我只使用原始http。(顺便说一句,这些应用程序ID/机密都是假的,无需编辑。)

对于这个例子,我有一个正常工作的开放图形对象,叫做“升级”,我在上面运行了调试器,一切都很好。它在这样一个网站上工作:然后我有一个新的开放图形动作类型(为了举例),叫做myaction,我已经在Facebook上注册了它

这是我试过的

步骤1:获取应用程序访问令牌

https://graph.facebook.com/oauth/access_token?client_id=1111111111&client_secret=my11app22secret&grant_type=client_credentials
curl -X POST -F 'promotion=http://mysite.com/promotion/66306/' -F 'access_token=someLongUserToken' https://graph.facebook.com/me/myapp:myaction
{"error":{"message":"(#15) This method must be called with an app access_token.","type":"OAuthException","code":15}}
curl -X POST -F 'promotion=http://mysite.com/promotion/66306/' -F 'access_token=1111111111|someapptoken' https://graph.facebook.com/me/myapp:myaction
{"error":{"message":"An active access token must be used to query information about the current user.","type":"OAuthException","code":2500}}
返回以下内容:

access_token=1111111111|someapptoken
步骤2:获取用户令牌

到这里: 选择我的应用,获取访问令牌,并具有发布操作的权限

Access Token:someLongUserToken
步骤3:尝试使用用户令牌

https://graph.facebook.com/oauth/access_token?client_id=1111111111&client_secret=my11app22secret&grant_type=client_credentials
curl -X POST -F 'promotion=http://mysite.com/promotion/66306/' -F 'access_token=someLongUserToken' https://graph.facebook.com/me/myapp:myaction
{"error":{"message":"(#15) This method must be called with an app access_token.","type":"OAuthException","code":15}}
curl -X POST -F 'promotion=http://mysite.com/promotion/66306/' -F 'access_token=1111111111|someapptoken' https://graph.facebook.com/me/myapp:myaction
{"error":{"message":"An active access token must be used to query information about the current user.","type":"OAuthException","code":2500}}
步骤4:尝试使用应用令牌

https://graph.facebook.com/oauth/access_token?client_id=1111111111&client_secret=my11app22secret&grant_type=client_credentials
curl -X POST -F 'promotion=http://mysite.com/promotion/66306/' -F 'access_token=someLongUserToken' https://graph.facebook.com/me/myapp:myaction
{"error":{"message":"(#15) This method must be called with an app access_token.","type":"OAuthException","code":15}}
curl -X POST -F 'promotion=http://mysite.com/promotion/66306/' -F 'access_token=1111111111|someapptoken' https://graph.facebook.com/me/myapp:myaction
{"error":{"message":"An active access token must be used to query information about the current user.","type":"OAuthException","code":2500}}
现在一个重要的线索可能是我的动作类型还没有得到“批准”,但是我是这个应用程序的管理员,所以它应该可以工作,不是吗

Approval Status:
Unsubmitted
This Action Type must be submitted for review in order for it to be available to all users. This Action Type is available to admins and developers of the app.
我错过了什么

谢谢!
-Jeff

检查操作的设置-您可以启用一个选项,该选项要求只能使用应用程序访问令牌进行发布-如果启用该选项,则#15消息是正确的

您也不能将应用程序访问令牌与
/me
快捷方式一起使用,因为“me”是指您正在使用其访问令牌的当前登录用户-如果您正在使用应用程序访问,则需要在路径中指定用户ID,而不是使用
/me/

FB.getLoginStatus(函数(响应)FB.api('/'+test_uid+'/notifications?'+accessToken+'&template=hitoni&href=','post',{},函数(响应){这行吗?