A few months ago I used to be able to pre-fill the dialog box with my own text so the user would only have to click share to share that text but it seems that Facebook has started to ignore that parameter like they say in this post: https://developers.facebook.com/blog/post/510/
So is there any other way around it so I can pre-fill a message that the user can easily share?
Thanks!
- (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 it is not possible anymore to pre-fill the message box with the javascript api, which is a good thing. after all it is against the platform policies:
https://developers.facebook.com/docs/guides/policy/application_integration_points/
but: it should still be possible with the php api/sdk. you just have to allow the user to edit the message before you send it, with a textarea or input field. just make a post to /me/feed with the message parameter.