Quantcast

Using FB SDK

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Using FB SDK

johnHolmes
Hi,

I'm working on app which needs to post on an user wall some informations about some contents. I've successfully created the FB app (with all the settings required) and I've successfully built my binding project to use the FB SDK. I'am able to use the FBSession to authenticate the user. Now I'm facing a strange issue. When I try to check for "publish_actions" permission in my FBSession.ActiveSession and, in case it's not present, adding it as new publish permission, the method fails and the sessions Permissions properties is populated with values { "status,permission" }.

So in brief, when i Call this method

`FBSession.ActiveSession.RequestNewPublishPermissions(
                    new[] { "publish_actions" },
                    FBSessionDefaultAudience.OnlyMe,
                    new FBSessionRequestPermissionResultHandler((session, error) =>
                    {
                        if(!session.Permissions.Contains(""))
                        {
                            System.Diagnostics.Debug.WriteLine("Unable to set publishing permission");
                            return;
                        }

                        if (error == null)
                        {
                            PostOnWall(null, callback);
                        }
                        else
                        {
                            System.Diagnostics.Debug.WriteLine("Error while trying to set new permissions");
                        }
                    })
                );`

I can see the auth flow correctly, the fb native app asks me to allow the publish permission but something goes wrong when it return control to my app, infact there's no "publis_actions" permission. Only "status,permission"

_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using FB SDK

johnHolmes
I think I've found something, it seems that the FBSession.ActiveSession, at some point, is collected for deallocation. That is. This is because permissions are "resetted"

any idea?


On Thu, May 8, 2014 at 7:18 PM, Francesco Colombo <[hidden email]> wrote:
Hi,

I'm working on app which needs to post on an user wall some informations about some contents. I've successfully created the FB app (with all the settings required) and I've successfully built my binding project to use the FB SDK. I'am able to use the FBSession to authenticate the user. Now I'm facing a strange issue. When I try to check for "publish_actions" permission in my FBSession.ActiveSession and, in case it's not present, adding it as new publish permission, the method fails and the sessions Permissions properties is populated with values { "status,permission" }.

So in brief, when i Call this method

`FBSession.ActiveSession.RequestNewPublishPermissions(
                    new[] { "publish_actions" },
                    FBSessionDefaultAudience.OnlyMe,
                    new FBSessionRequestPermissionResultHandler((session, error) =>
                    {
                        if(!session.Permissions.Contains(""))
                        {
                            System.Diagnostics.Debug.WriteLine("Unable to set publishing permission");
                            return;
                        }

                        if (error == null)
                        {
                            PostOnWall(null, callback);
                        }
                        else
                        {
                            System.Diagnostics.Debug.WriteLine("Error while trying to set new permissions");
                        }
                    })
                );`

I can see the auth flow correctly, the fb native app asks me to allow the publish permission but something goes wrong when it return control to my app, infact there's no "publis_actions" permission. Only "status,permission"


_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch
Loading...