- Home /
Prime31: Posting To Facebook
I'm currently Prime31's Social Networking plugin so I can get basic Facebook support in my android application. I placed three buttons in a scene with the following code:
Button 1: "Login"
FacebookCombo.init();
var permissions = new string[] {"email"};
FacebookCombo.loginWithReadPermissions(permissions);
Button 2: "Publish Permissions"
var permissions = new string[] {"publish_actions", "publish_stream"};
FacebookCombo.reauthorizeWithPublishPermissions(permissions, FacebookSessionDefaultAudience.OnlyMe);
Button 3: "Post"
var parameters = new Dictionary<string,object>
{
{"link", "http://prime31.com"},
{"name", "link name goes here"},
{"picture", "http://prime31.com/assets/images/prime31logo.png"},
{"caption", "the caption for the image is here"},
{"description", "description of what this share dialog is all about"}
};
FacebookCombo.showFacebookShareDialog(parameters);
I'm having a couple of issues: 1) If I press the "Login" button, a separate window from Facebook does pop up and ask the user for a name and password, but only if that user has the Facebook app installed on their device. Is there something else I need to check for in this case? I had thought that Prime31 would open a browser window if the Facebook app wasn't found. 2) If I press the "Post" button, I see a new window pop up for about half a second before disappearing. What would be causing this? And Is there anything that I'm missing in the three buttons that I need in order for this to work? All I'm attempting to do is post a simple message to Facebook if the user clicks the button to do so.
Any help would be greatly appreciated.