实时更新正在踢我的屁股! 我有我的整个fb应用程序工作除了这个区域,我只是不确定我做错了什么。
我的应用程序已使用以下权限批准:
"scope" => "offline_access,publish_stream,read_stream,user_location,user_status",接下来,我使用以下设置订阅:
$subscribe = array( 'access_token'=> substr($my_access_token,13), 'object' => 'user', 'fields' => 'name,feed', 'callback_url' => $fbconfig['callback'], 'verify_token' => $fbconfig['secret']);通过我的应用程序,我发布了比尔史密斯的行为状态更新(用户ID:000041143),并出现在比尔史密斯的墙上就好了。 接下来,使用John Doe的帐户(用户ID:000004842但未授权我的应用程序)我评论Bill Smith的墙上发布的状态,这会触发回调,但我得到的(见下文)是一个条目告诉我认为John Doe的墙已经改变,并且没有提到Bill Smiths的墙。
这是回调中给出的通知:
updates = Array ( [object] => user [entry] => Array ( [0] => Array ( [uid] => 000004842 [id] => 000004842 [time] => 1325101631 [changed_fields] => Array ( [0] => feed ) ) [1] => Array ( [uid] => 000004842 [id] => 000004842 [time] => 1325101651 [changed_fields] => Array ( [0] => feed ) ) ) )正如你所看到的,这不是一个通知,已经对比尔史密斯墙做了评论,但是已经向约翰·多伊做了一个......我不明白......我一定是做错了!
Realtime updates are kicking my ass! I have my entire fb app working except for this one area and I'm just not sure what I'm doing wrong.
My app is approved using these permissions:
"scope" => "offline_access,publish_stream,read_stream,user_location,user_status",Next, I subscribe using these settings:
$subscribe = array( 'access_token'=> substr($my_access_token,13), 'object' => 'user', 'fields' => 'name,feed', 'callback_url' => $fbconfig['callback'], 'verify_token' => $fbconfig['secret']);Via my app I post a status update on behaf of Bill Smith (userid: 000041143) and that appears on Bill Smith's wall just fine. Next, using a an account for John Doe (userid: 000004842 which has NOT authorized my app) I comment on the status post made on Bill Smith's wall and this triggers the callback but what I'm getting (see below) is an entry telling me that John Doe's wall has changed and no mention of Bill Smiths wall is ever made.
Here's the notification given in the callback:
updates = Array ( [object] => user [entry] => Array ( [0] => Array ( [uid] => 000004842 [id] => 000004842 [time] => 1325101631 [changed_fields] => Array ( [0] => feed ) ) [1] => Array ( [uid] => 000004842 [id] => 000004842 [time] => 1325101651 [changed_fields] => Array ( [0] => feed ) ) ) )As you can see, this is not a notification that a comment has been made to Bill Smiths wall but that one has been made to John Doe's... I dont get this... I must be doing SOMETHING wrong!
最满意答案
我之前有类似的问题,照片ID出现“错误”,问题出现了,因为我把它当作INT而不是因为它太大而截断了它,我不得不把它当作一个字符串。 这可能是你的问题吗?
I had similar issues before with photo IDs turning up 'wrong', the issue occurred because I was treating it as an INT but PHP was truncating it because it was too big, I had to treat it as a string. Could this be your issue perhaps?
更多推荐
发布评论