AS3 API:删除应用程序邀请 [英] AS3 API: Deleting App Invites

查看:107
本文介绍了AS3 API:删除应用程序邀请的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的项目使用ActionScript-Facebook API.现在,Facebook让我们删除应用程序邀请后就删除它们.

I'm using the ActionScript-Facebook API for my project. Facebook now leaves it up to us to delete app invites once they are used.

在他们的文档中,他们有一个JavaScript代码段可以执行我需要做的事情:

In their documentation, they have a JavaScript snippet to do what I need to do:

FB.api(requestId, 'delete', function(response) {console.log(response);});

很酷. AS3 API调用类似于:

Cool. The AS3 API call is like such:

Facebook.api(referID, callback, "POST");

对于我的一生,我不确定该如何工作.我尝试过:

For the life of me, I'm not sure how to work this. I've tried:

Facebook.api(referID, function(){trace("callback");}, "delete");

Facebook.api(referID, function(){trace("callback");});

Facebook.api(referID, {access_token:accessTokenString}, "delete");

以下是文档:

https://developers.facebook.com/docs/reference/dialogs/requests/#deleting

推荐答案

以下用于删除应用程序请求:

The following worked for removal of application requests:

var full_request_id : String = request_id + "_" + user_id;
var method : String =  "/" + full_request_id;
Facebook.deleteObject(method, callback);

@see AbstractFacebook.as 然后,actionscript-api会将值为"delete"的属性"method"添加到调用的参数中:

@see AbstractFacebook.as The actionscript-api will then add the property 'method' with value 'delete' to the parameters of your call:

protected function deleteObject(method:String, callback:Function = null):void {
        var params:Object = {method:'delete'};
        api(method, callback, params, URLRequestMethod.POST);
    }

if (params.access_token == null) { params.access_token = accessToken; }

这篇关于AS3 API:删除应用程序邀请的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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