Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17108

Get facebook username and save locally

$
0
0

@Dobby90 wrote:

I am using facebook in my game with SDKBox on Android and i cant seem to figure out how to save the user name once i get it using this:

sdkbox::FBAPIParam params;
sdkbox::PluginFacebook::api("me", "GET", params, "me");

void FBConnection::onAPI(const std::string& tag, const std::string& jsonData){
CCLOG("##FB >>onAPI: tag -> %s, json -> %s", tag.c_str(), jsonData.c_str());

playerName = jsonData.c_str();
MessageBox(playerName.c_str(), "Name");
}

this will display it to me in a message box with the id.. how do i get just the username and save it so i can display it in the game?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17108

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>