Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › facebook plugin

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5098

    Saims

    Hi,

    I’m implementing the facebook-plugin right now and therefore i have a question. In our case we want to have one button in our main menu, where the user can share on his wall that he’s playing crazyElephant.

    I know that the following code is missing some if/else-statements, but I think it should work, when i press the button for the first time. So i want that the user connects to FB and without another button-click can share the post.

    But with this code, unfortunately the user can just connect to FB and then returns to the app, without being able to post.

    function postToUsersWall() {
            //if not connected
            facebook.openSession();
    
            //if connected, just the following code
            facebook.openWallDialog( {
                                        "link" : "https://play.google.com/store/apps/details?id=xom.xxmassdeveloper.CrazyElephant&hl=de",
                                        "description" : "Download this awesome game for android!",
                                        "name" : "Crazy Elephant",
                                        "caption" : "by X.X MassDeveloper",
                                    } );
        }
    
     

     

    Is there a possibility, to combine this logic with a single button, so that the user can always share with one click, even if he wasn’t connected? Or is it only possible to connect before (e.g. with a dialogue that opens on the 5th app-start) and then get rid of the facebook.openSession() in this function?

    #5100

    Alex
    Felgo Team

    Hi,

    could you please tell us on which platform you’re testing (Android or iOS)? Furthermore, is the native Facebook App installed or how does the connect happen (in-app, app switching, webview)?

    Thanks,

    Alex

    #5115

    Saims

    I’m testing it on Android and the facebook app is not installed.

    When i click the connect-button, a facebook-login page opens up in a webview.

    #5243

    Alex
    Felgo Team

    Hi,

    I just revised your code snippet, this one can’t actually work like you expect it to do. The call facebook.openSession(); is an asynchronous one, meaning that you would have to implement onSessionStateChanged: and send your request as soon as the session is opened.

    By the way, we will publish a revised version of our Facebook plugin tomorrow which should fix some other bugs on Android. 🙂

    Cheers,

    Alex

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded