发布自定义对象返回“发生未知错误OAuthException Code 1”错误信息。

3
使用Graph API Explorer,我可以使用应用程序令牌或用户令牌重现此错误。
调用(POST)
/0000userid0000/mynamespace:Create
thread=aURLonOurSite
access_token=xxxxxx

响应

{
  "error": {
    "message": "An unknown error has occurred.", 
    "type": "OAuthException", 
    "code": 1
  }
}

运行令牌调试显示我有权限:
Issued : 1346937448 (about an hour ago) 
Expires: 1352121448 (in about 2 months) 
Valid  : True 
Origin : Web 
Scopes : email publish_actions user_location

2
需要更多信息才能重现您的问题...FB是否已经批准了该操作,或者您是否正在使用测试用户、沙盒模式等。调试器对您的Open Graph对象URL有何说法? - CBroe
这是具有批准操作的实时站点。您不会相信,当我的主机名中有一个大写字母时,开放图形调试器会返回“解析输入URL错误,未抓取任何数据。”如果我将其全部改为小写,则调试器可以正常工作。我将进行测试并告诉您是否仍然会出现错误。 - missaghi
那就是问题所在。主机名不应该区分大小写。即使是Google.com,直到你把它变成小写字母才能成功:http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.Google.com - missaghi
1个回答

1

您的问题不够清晰,但我将向您展示一个我在以前项目中使用过的例子。

$params = array(
    'voucher'=>$plink,//'https://thevoucherlink.com/account/order/post.php?image='.$file_name.'&business_name='.$dd['title'].'&from='.$_SESSION['fb_uid'].'&to='.$_POST['friend_id'].'&msg='.$d['giftmsg'],
    'access_token'=>$facebook->getAccessToken(),
    'message'=>$d['giftmsg'],
    );

$out = $facebook->api('/me/thevoucherlink:send','post',$params);

这里我使用了send操作来处理Voucher对象。我想你的参数中没有使用对象。

谢谢。


谢谢,但错误在于Open Graph似乎只接受小写主机名。 - missaghi

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接