Difference between revisions of "FBInstant.player.getPhoto"
From GiderosMobile
Line 2: | Line 2: | ||
'''Available since:''' Gideros 2018.3<br/> | '''Available since:''' Gideros 2018.3<br/> | ||
=== Description === | === Description === | ||
− | <br /> | + | <translate><br /> |
A url to the player's public profile photo. The photo will always be a square, and with dimensions of at least 200x200. When rendering it in the game, the exact dimensions should never be assumed to be constant. It's recommended to always scale the image to a desired size before rendering. The value will always be null until FBInstant.startGameAsync() resolves.<br /><br /> | A url to the player's public profile photo. The photo will always be a square, and with dimensions of at least 200x200. When rendering it in the game, the exact dimensions should never be assumed to be constant. It's recommended to always scale the image to a desired size before rendering. The value will always be null until FBInstant.startGameAsync() resolves.<br /><br /> | ||
WARNING: Due to CORS, using these photos in the game canvas can cause it to be tainted, which will prevent the canvas data from being extracted. To prevent this, set the cross-origin attribute of the images you use to 'anonymous'.<br /> | WARNING: Due to CORS, using these photos in the game canvas can cause it to be tainted, which will prevent the canvas data from being extracted. To prevent this, set the cross-origin attribute of the images you use to 'anonymous'.<br /> | ||
− | <br /> | + | <br /></translate> |
<source lang="lua"> | <source lang="lua"> | ||
(string) = FBInstant.player.getPhoto() | (string) = FBInstant.player.getPhoto() | ||
</source> | </source> | ||
=== Return values === | === Return values === | ||
− | '''Returns''' (string) Url to the player's public profile photo.<br/> | + | '''Returns''' (string) <translate>Url to the player's public profile photo.</translate><br/> |
Revision as of 13:32, 23 August 2018
Available since: Gideros 2018.3
Description
A url to the player's public profile photo. The photo will always be a square, and with dimensions of at least 200x200. When rendering it in the game, the exact dimensions should never be assumed to be constant. It's recommended to always scale the image to a desired size before rendering. The value will always be null until FBInstant.startGameAsync() resolves.
WARNING: Due to CORS, using these photos in the game canvas can cause it to be tainted, which will prevent the canvas data from being extracted. To prevent this, set the cross-origin attribute of the images you use to 'anonymous'.
(string) = FBInstant.player.getPhoto()
Return values
Returns (string) Url to the player's public profile photo.