facebookfacebook-graph-apifacebook-javascript-sdkfacebook-requestsfacebook-invite

Is this the best way to integrate and use the Facebook API "toolset" in my quiz game?


Im currently building a simple time based quiz game with Javascript. In this game im looking to enable the option of being able to challenge your facebook friends.

This has naturally had me look at the Facebook (API) tools available that would allow me to interact with the targeted friends to be challenged. Im wondering if anyone could comment on my approach of the Facebook tools intended to be used and whether there's actually some better approach or even Facebook tools that I have missed and should consider in my setup.

My intention is to interact and engage with the friends I challenge / invite using the most relevant Facebook tools available.

1. FB Login - USER CREATE / LOGIN

The user connects through Facebook login - either creating a user profile or automatically getting logged in upon visit, if the fb_uid already exists in the DB. We get access token, email and all the basic stuff.

2. FB Request dialog - CHALLENGE YOUR FACEBOOK FRIENDS

The user clicks a "Challenge your friends" button and the Facebook Request dialog is initiated showing the inbuilt Facebook multi friend invite selector box. The user click some friends and submits.

= RESULT - A request to the friend is now viewable and visible in the App center

3. FB App Notifications - Engage more "visible" with your challenges friend

Upon submit from step nr 2, we would also initiate a App Notification call to the Graph API, that would eneable us to "post" a notification direct into the challenged notification tray.

There are some restrictions on which user you can post directly into the tray at, which would leave us to do some pre-checking on the basis of:

3.1 - First check if the challenged/invited user already has authorized the app

3.2 - If 3.1 is true, then initiate the App notifications Graph API call = notification posted to the tray. One important note to this step - i've read that before you can initiate this call, then you need to fetch the Access token of the app itself and make the call to the Graph API with the app access token and not the user access token - not sure if anyone can confirm this.

3.3 - If 3.1 is false, then we're just left with the request to the app center.

QUESTIONS:

Q1. The intended interaction of challenging/inviting your friends in step nr 2 "worries" me a bit. Seeing the request ends up in the App center ONLY, the only way the user will see the notification is "accidently" seeing a number next to the App center left menu link. To me it seems unlikely few people will react to this??

Q2. The real engaging interaction seems to be in App Notifications - however you can only use this with users that ALREADY have accepted your app, leaving out a big chunk of people to interact more "visible" with.

I do know this restriction is probably due to spammy behaviour.

Are this really the most optimal approach of the Facebook toolset I can use in my little game?


Solution

  • The general idea of your approach seems fine. I've never had any experience with App Center, so i can't really comment on how effective and easy it would be implementing that approach, but there is an alternative.

    Instead of inviting friends through App Center, you can simply leave a message on their wall using JS feed dialog, asking them to join you in the game (Leave a link or something that will handle the challenge part)