开发者

facebook app invite notification won't go away even though delete comes back ok

I have a facebook app and have it working far enough that users can invite friends, but I can't seem to delete the noti开发者_JAVA百科fications.

I'm in python, on Django, using urllib to issue the delete request thusly:

conn = httplib.HTTPSConnection('graph.facebook.com')
user = request.facebook.user
t = urllib.quote(user.oauth_token.token)
conn.request("DELETE", '/%s_%s?access_token=%s' %(request_id, uid, t))
print(conn.getresponse().reason)

So I'm getting "OK" back as the .reason, but the notifications aren't going away.

what am I doing wrong?


You should notice that the request_id returned by FB sometimes has many IDs. For example, if 2 or more friends invite you to use an application, Facebook may join those request_id to one string. The request_id params may have the format "A_FacebookId,B_FacebookId".

You must split the parameters to retrieves the correct id, and delete them one by one. So far it works well for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜