[英]Blanck facebook feed dialog box in titanium android
我正在尝试使用facebook feed API将帖子发送到选定的facebook朋友墙(因为图形API现在仅对我而言适用于iphone,这是原因:这是我编写的代码:
//facebook initialization :
facebook = require('facebook');
facebook.setBubbleParent(false);
facebook.appid = 'xxxXXmyappIdXXxxx';
facebook.permissions = ['publish_stream', 'read_stream', 'email','user_photos', 'friends_photos', ' user_events', 'friends_events','user_likes'];
facebook.forceDialogAuth = true;
var data = {
link: 'xxxXXXX mylink XXXXXxxxxxx'+Alloy.Globals.invitation_code,
name: L('fb_invite_wall_post_name'),
message: L('fb_invite_wall_post_msg')+Alloy.Globals.invitation_code+"'",
caption: L('fb_invite_wall_post_caption'),
picture: "xxxXXXX picture Url XXXXXxxxxxxlogo_big.png",
description: L('fb_invite_wall_post_descrpt')+Alloy.Globals.invitation_code+"'.",
to:this.user_uid
};
//facebook.requestWithGraphPath(this.user_uid+'/feed', data, 'POST', showRequestResult);
facebook.dialog("feed", data, showRequestResult);
我得到了一个blanck facebook feed对话框,如下所示:
将帖子发送到我自己的墙上总是可以的,但是无论是否适合“ to”参数的条件:(该ID必须是也使用您应用程序的朋友),都不能成功地发送到另一个朋友的墙上。
一种解决方法是使URL具有参数:
https://www.facebook.com/dialog/feed?
app_id=145634995501895
&display=popup&caption=An%20example%20caption
&link=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2F
&redirect_uri=https://developers.facebook.com/tools/explorer
并使用openUrl()方法在浏览器上将其打开。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.