Forums

OverviewV-Play 2 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
    V-Play 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 2 years, 6 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
    V-Play 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
    V-Play 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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support