-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
share successcb does not return postId #12
Comments
Hi there, I remember this issue vaguely, so I might be wrong but I suppose there was an inconsistency between iOS and Android on that. If you can test it on Android and let me know, I can apply the patch both in typescript and javascript sides of the plugin. |
Ok, I can confirm it works in Android, with native FB App installed and without. But now I stumbled over the next problem. If I use the native iOS FB App the share function does not return the postID as well. I previously only tested without having the FB App installed. After digging in the code, there is the same problem in the native iOS code. Feed works fine, but share does not return the postId to the javascript function. I see that it is even documented this way, but the Facebook SDK supports it and it is quite easy to fix. Or is there any other reason why you do not support postId in native iOS? com.ccsoft.plugin.CordovaFacebook/src/ios/CordovaFacebook.m:340 should look like this:
Now there is the problem, that facebook native SDK returns postId and not post_id. You could normalize this in the iOS code, but as I am not so fluent in Objective-C I fixed it in CordovaFacebook.js:
|
Hi,
|
The share function does not return the post id on success:
I guess it is supposed to work like the feed function and https://github.com/ccsoft/cordova-facebook/blob/master/www/CordovaFacebook.js#L94 should look like:
I patched this locally and can confirm that this will work on iOS. Will test android later.
Anyhow, thanks for the work on this plugin! Much appreciated...
The text was updated successfully, but these errors were encountered: