Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Philippe2803 · May 11, 2018 at 05:27 PM · Friends

I want to use Facebook Game Request feature? How would I go about that?

Basically, I have been looking at a facebook integration to invite facebook friends specifically, using the facebook feature "game request" in the form of invite. It is a feature that exists in the facebook API, but I've been unable to understand if I would be able to use it with Playfab/FB integration.

The feature in question is explained here: https://developers.facebook.com/docs/games/services/gamerequests#invites

I found no other threads in forums that specifically deals with this feature in the scope of Playfab.

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by pfnathan · May 11, 2018 at 06:43 PM

You could call PlyfabID as follows ... Note: it's just for the reference.

Below code are from https://developers.facebook.com/docs/games/services/gamerequests#invites UnitySDK

FB.AppRequest(
  message: "I Just got " + GameStateManager.Score.ToString() + " points! Can you beat it?",
  to: recipients,
  data: "{\"challenge_score\":" + GameStateManager.Score.ToString() + "}"
  title: "Friend Smash Challenge!",
  callback:appRequestCallback
);

Modify above code to something like this by adding "PlayfabId"

var playFabIdStored = "34098409234";
 
FB.AppRequest(  message: "I Just got " + GameStateManager.Score.ToString() + " points! Can you beat it?",  
   to: recipients,  
   data: {"challenge_score":1000, "PlayFabId":playFabIdStored } 
   //"{\"challenge_score\":" + GameStateManager.Score.ToString() + "}"  
   title: "Friend Smash Challenge!",  
callback:appRequestCallback
);

Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Philippe2803 · May 12, 2018 at 08:01 AM 0
Share

I'm not entirely sure I follow. How is the PlayfabID related to Facebook SDK here? Is it actually a reference to the facebook token?

If playfab would let me use the token from facebook directly, I guess I could then build my own features around this.

avatar image Brendan ♦♦ Philippe2803 · May 13, 2018 at 06:12 AM 0
Share

Can you please clarify what you saw that implied the Facebook game request feature was compatible with PlayFab? We have custom game server hosting, which you can use to host game sessions, but we generate unique Lobby IDs for all games which are unrelated to anything in Facebook.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    Photon chat or PlayFab friends? 1 Answer

    Tags does not show in GetFriendLeaderboard 1 Answer

    Server API for GetFriendLeaderboardAroundPlayer equivalent missing 1 Answer

    LinkFacebookAccount ForceLink 1 Answer

    Chat using photon chat 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges