[英]Pre-Fill Dialog box using FBConnect?
几个月前,我曾经能够用我自己的文本预填充对话框,因此用户只需单击“共享”即可共享该文本,但是Facebook似乎已经开始像他们在这篇文章中所说的那样忽略该参数。 : https : //developers.facebook.com/blog/post/510/
那么,还有其他方法可以让我预先填写一条用户可以轻松共享的消息吗?
谢谢!
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
[super webViewDidFinishLoad:webView];
if (defaultStatus)
{
// Set the pre-filled status message
[_webView stringByEvaluatingJavaScriptFromString:
[NSString stringWithFormat:@"document.getElementsByName('feedform_user_message')[0].value = decodeURIComponent('%@')",
[SHKEncode(defaultStatus) stringByReplacingOccurrencesOfString:@"'" withString:@"\\'"]
]
];
// Make the text field bigger
[_webView stringByEvaluatingJavaScriptFromString:@"document.getElementsByName('feedform_user_message')[0].style.height='100px'"];
}
}
afaik无法再使用javascript api预先填充消息框,这是一件好事。 毕竟这违反了平台政策:
https://developers.facebook.com/docs/guides/policy/application_integration_points/
但是:php api / sdk仍然应该可行。 您只需要允许用户在发送消息之前使用文本区域或输入字段来编辑消息即可。 只需使用message参数在/ me / feed中发布即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.