Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Share dialog example for mokesmoke's Facebook module

$
0
0

I'm looking for a more complete example of using the Share dialog with the mokesmokes Facebook module for Android. I guess my issue is figuring out what in his example is placeholder text, and what must be used as-is. The examples on the Facebook developer docs site seem to use different parameter names, different params, etc.

Looking at the Facebook docs, it seems like I should be able to get a share dialog that looks like part on the left, with a custom picture, title, and description.

share dialog

With this code, the share dialog opens. But it is essentially empty...I get a gray box instead of the image I'm passing. My app's name and URL are shown but are the data I entered into the Facebook developer site, not what is sent via the code.

if(fb.canPresentShareDialog) {
    fb.share({
        url: 'http://myapp.com/foo/' + args.foo.id, 
        objectName: "me/objects/myapp:foo", 
        imageUrl: 'http://myapp.com/img123.jpg', 
        title: 'MyApp', 
        description: args.foo.description, 
        namespaceAction: "me/myapp:share" 
    });
} else {
    alert('Unable to share to Facebook. Do you have the Facebook app installed?');
}
If I include the namespaceObject param as shown in the module's readme, the Share dialog opens then immediately closes.

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>