Facebook请求ID被检索和删除 [英] Facebook Requests ID(s) retrieve and delete

查看:157
本文介绍了Facebook请求ID被检索和删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我正在开发一个小型的Web应用程序,它实现了请求对话框(User-to-User)



我可以发送邀请并成功保存数据作为请求ID和用户ID。但是当用户被重定向到我的应用程序时,点击请求后,我无法检索请求ID,如下所示: https://developers.facebook.com/docs/requests/#deleting ,然后删除它。



但是,我在浏览器的地址栏中看到请求ID,如下所示: http://apps.facebook.com/myownapp/?fb_source=request&request_ids=210655195715938 和REQUEST_URI是:/ halten /?fb_source =请求& request_ids = 210655195715938



我尝试使用javascript:

 函数getMultipleRequests(requestIds){
FB.api('',{
ids:requestIds
},function(response){
console.log(response);
});
}

或与php:



$ pre> if(isset($ _ REQUEST ['request_ids'])){
$ requestIDs = explode(',',$ _REQUEST ['request_ids']);
foreach($ requestIDs as $ requestID){
try {
$ delete_success = $ facebook-> api('/'。$ requestID,'DELETE');
} catch(FacebookAPIException $ e){
error_log($ e);
}
}

但request_ids始终为空,但我的浏览器显示request_id



所以问题是如何处理问题?
提前感谢

解决方案

A 用户到用户请求实际上通知用户4个级别。



1)宝石通知





2)书签计数器





3)右上角计数器





4)应用程序内的奇怪的位置通知(我不知道这叫做什么抱歉)





所有这些请求会将用户带到应用程序,但不幸的是在Jewel通知(#1)请求url将包含所有请求ID,其余将只包含一个单个请求ID。



说你发送4个请求(1,2,3,4)



#1 在url中将有 1& 2& 3& 4



#2,#3,#4 将有其中一个根据您对

的回复通知

希望这是有道理的,并回答了这个问题。


So I'm developing a small web app, that implements the Requests Dialog(User-to-User).

I'm able to send an invite and also successfully to save data as request id and user id. But when the user gets redirected to my app, after clicking on the request, i can't retrieve request id as shown here: https://developers.facebook.com/docs/requests/#deleting and then delete it.

But i see the request id in the address bar of the browser and it looks like this: http://apps.facebook.com/myownapp/?fb_source=request&request_ids=210655195715938 and REQUEST_URI is: /halten/?fb_source=request&request_ids=210655195715938

i tried with javascript:

function getMultipleRequests(requestIds) {
    FB.api('', {
        "ids": requestIds
    }, function(response) {
        console.log(response);
    });
}​

or with php:

if(isset($_REQUEST['request_ids'])) {
    $requestIDs = explode(',' , $_REQUEST['request_ids']);
    foreach($requestIDs as $requestID) {
      try {
        $delete_success = $facebook->api('/' . $requestID, 'DELETE');
      } catch(FacebookAPIException $e) {
        error_log($e);
      }
    }

but the request_ids is always empty but my browser shows the request_id

So the question is how to handle the problem? Thanks in advance

解决方案

A User to User Request is actually notified to the user in 4 levels.

1) Jewel notification

2) Bookmarks counter

3) Right top counter

4) Weird location notification inside the app(I did not know what this was called sorry)

All of these request will take the user to the app but unfortunately on the Jewel notification(#1) request url will contain all the request IDs and the remaining will contain only a single request ID.

Say you send 4 requests (1,2,3,4)

#1 in url will have 1&2&3&4

#2,#3,#4 will have one of those depending on which notification you response to

Hope this makes sense and answers the question.

这篇关于Facebook请求ID被检索和删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆