How do I invite friends with Facebook plugin

0 favourites
  • 3 posts
From the Asset Store
[C2] [C3] NOT support C3 build service | support Banner ads, Interstitial ads, Rewared video ads.
  • Can any body help me how to invite friends using Facebook plugin?

  • Hi,

    Using the plugin is very complicated. You have to create a fresh plugin for this to work.

    You have to manually create Actions / conditions / expressions in runtime.js and edittime.js in exporters/html5/plugins/facebook folder. For this approach you can check the following tutorials written a long time back:

    If you find it difficult, the alternative, I think is to custom update c2runtime.js in the exported app folder.

    This is the process I followed:

    1. Use browser object in the project

    2. In the event where you want to invite friends, set the action "go to URL". In the URL field, enter any identifiable text. For Example "Haider Is Great"

    3. Export the project to HTML5

    4. Open C2runtime.js.

    5. In C2runtime.js, define your own JS code to request FB for "invitable friends" and Creating a Multifriend selector

    6. In C2runtime.js, search for Haider Is Great (cntrl+f). Here you'll find "Got to URL" function.

    7. Replace "Got to URL" function, with the function name you created.

    On top of this you'll need send request to friends also.

    Looks complicated. But it is simple. The code examples are available on Facebook developers document pages.

    You'll need to go through the following:

    1. Canvas game tutorial (will give you code for sending friend requests)

    2. Invitable Friends - this is a new feature and it is very useful (will give you necessary code for getting the friend's list)

    3. Multi-Friend Selector - (will give you code for creating menu to select the friends to whom request has to be sent)

    Let me know if this is helpful.

    I'm not a programmer, but I know that my JS developer implemented this in my project.

    If possible, I'll post screenshots of this process later.



  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • thanks and hope it would be simple

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)