1
\$\begingroup\$

What's the best and simple way to post score from my game to Facebook and Twitter with store link in cocos2d-x?

\$\endgroup\$
1
  • \$\begingroup\$ I'm not sure if it's the best way, but both FB and twitter provided API for these actions. you can open a TCP connection to their server and send a request based on their API \$\endgroup\$
    – Ali1S232
    Commented May 9, 2012 at 12:44

1 Answer 1

1
\$\begingroup\$

Twitter has a developer portal, where you'll probably want to check out the REST API. Specifically the POST statuses/update endpoint. Because this API is HTTP-based, you'll need a way to make such requests from your game. This question on SO addresses that subject, with suggestions such as curlpp.

Facebook has a similar set of APIs available, described on their developer portal. Unfortunately most of their actual documentation is behind a Facebook login wall, so I won't link it directly. But if you search for "facebook api post to wall" you get several results, including direct links to the graph API documentation for posting and this SO question.

Facebook has JavaScript, Objective-C and Java-based APIs.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .