As I maganged how to do basics like saving score to leaderboard and reading it as separated "players best" and "full leaderboard" I can show it below maybe it will help someone :
-> System: Set cur_score to score
-> InstantGames: Set score to cur_score on leaderboard "leaderboard" (contextual: No)
To be able to save score you need to configure (add leaderboard) first in fb instant games interface in "my apps" tab".
Then I have Personal best in separated elegant view with sheel like this:
+ System: On start of layout
-> InstantGames: Load player score from leaderboard "leaderboard" (contextual: No)
+ InstantGames: On player score loaded
-> PersonalBesttx: Set text to InstantGames.PlayerName
-> PersonalBesttx_score: Set text to InstantGames.PlayerScore
And it works.
When it comes to full leaderboard (also another view, with some additional functions):
+ InstantGames: On leaderboard loaded
----+ System: For "" from 1 to 10
-----> txt_scores: Append "# "&LoopIndex&". "&InstantGames.LeaderboardPlayerNameAt(LoopIndex) &"---"&InstantGames.LeaderboardScoreAt(LoopIndex)&" "&newline
----+ (no conditions)
-----> System: Set wantToAddPersonalBest to True
-----> InstantGames: Load player score from leaderboard "leaderboard" (contextual: No)
+ InstantGames: On player score loaded
+ System: Is wantToAddPersonalBest
+ System: InstantGames.PlayerRank > 10
-> System: Set wantToAddPersonalBest to False
-> txt_scores: Append InstantGames.PlayerRank&" "&InstantGames.PlayerName&" "&InstantGames.LeaderboardScoreAt(InstantGames.PlayerRank)
And it works great aso.
BUT I have a question (maybe bug in instant games?)
If I have something like this:
+ Touch: On touched ButtonImage_Share_FB
----+ InstantGames: Is available
-----> InstantGames: Invite with image ImageFB, text ""&(score+20), data InstantGames.PlayerID
----+ (no conditions)
-----> Function: Call "PrepareToRestart" ()
+ Touch: On touched ButtonImage_Share_Messanger
----+ InstantGames: Is available
-----> InstantGames: Request with image ImageFB, text "", data InstantGames.PlayerID
----+ (no conditions)
-----> Function: Call "PrepareToRestart" ()
It doeasnt matter which intent I use it always make "share on FB WALL" (no matter if I have button with : Request, Invite, Share or Chellenge)
additionally if I use Additionally if I use "share" it never shares specified text from "text" field.
It would be great if someone could clarify what every intent should do in documentation and check if it is really a bug :)