0 Favourites

How do I invite friends with Facebook plugin

  • Can any body help me how to invite friends using Facebook plugin?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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:

    https://www.scirra.com/tutorials/445/facebook-how-to-get-a-list-of-friends

    https://www.scirra.com/tutorials/446/facebook-how-to-invite-a-friend

    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.

    Cheers,

    Capper

  • thanks and hope it would be simple

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
1,068 148,700
Reflextions's avatar
Reflextions
Unread hot topic
0 Favourites
[plugin] firebase
687 65,171
cybertron7's avatar
cybertron7
Unread hot topic
0 Favourites
[PLUGIN] Canvas
627 186,717
zenox98's avatar
zenox98