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

Forums

OverviewFelgo 3 Support (Qt 5) › Get Players Images

Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #13421

    Nour

    Hi

    Can i get players images from multiplayer component?

    and how to get player image and name from leaderboard?

     

    Thanks

    #13425

    Günther
    Felgo Team

    Hi!
    You can access the profile image from the GameNetwork user with the VPlayGameNetwork component:

    For example:

    function getPlayerData() {
        gameNetwork.sync()
    
        // get image (or other relevant player data)
        var playerImage = ""
        if(gameNetwork.user.profileImageUrl) {
          playerImage = gameNetwork.user.profileImageUrl
        }
    
        // do sth with the data
    
        // to get the data of other players in the game, you could send the player data
        // to all other players of the game by using multiplayer.sendMessage(...)
        // (maybe we will simplify player data access of all game participants in the future)
    }

     

    Best,
    Günther

     

    • This reply was modified 7 years, 11 months ago by  GT.
    #13652

    Nour

    Hi Gunther

    I am not able anymore to get the image link, when you post the answer it was working

     

    Please advice

     

    Thanks

    #13653

    Alex
    Felgo Team

    Hello,

    Are you trying to show the image of the local user or a multiplayer user?

    The profile picture is only available for the local user when successfully connected to Facebook. With the coming update it is also possible to display images for all multiplayer users in the current session.

    Best,

    Alex

    #13654

    Nour

    Hi

    I am trying to show local player image, and player already connected to facebook

     

    In the console log there no image

     

    EEFBD95FD9A2″,”facebookId”:”10201664405408330″,”facebookToken”:””,”facebookTokenValid”:false,”firstName”:””,”gender”:””,”lastName”:””,”locale”:””,”name”:”5180526″,”profileImageId”:0,”profileImageUrl”:””,”ranking”:0,”timestamp”:1,”userId”:5180526} , old userData: undefined

     

    #13663

    Günther
    Felgo Team

    Hi,

    is the Facebook session opened correctly? (please have a look at the Facebook::sessionState)
    Also, it is required to load the Facebook user profile with a call to Facebook::fetchUserDetails once the session is opened. Are you able to access the profile after calling fetchUserDetails?

    Best,
    Günther

Viewing 6 posts - 1 through 6 (of 6 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