3

I'm working on linux.

I have been looking for a method to post on Facebook from a c++ app (that runs in Android and Iphone using cocos2d-x). I have found some code in c++ to post on Facebook and Twitter, but it does not compile on linux. This or this.

In theory, I think, using http request, it could be easy to do, but i'm not sure.

The same question on cocosd2-x forum.

Some idea about this theory?

Is possible, but better use oficial libraries, added in THIS wiki

Community
  • 1
  • 1
vgonisanz
  • 11,831
  • 13
  • 78
  • 130
  • 1
    You should be aware that Facebook officially supports only PHP, and that their API changes often enough that you probably want a third-party platform which is popular enough to be reliably supported and/or simple enough that you can fix it. Are you already using Qt for other networking operations? – Potatoswatter Jun 28 '12 at 13:09
  • 1
    I'm not using Qt, the facebook-cpp-graph-api work using qt, but I use cocos2d-x libraries – vgonisanz Jun 28 '12 at 13:36
  • 3
    if you are familiar with low level codes, you can try to use libcurl to send http request. libcurl is included in cocos2d-x. – m.ding Jul 04 '12 at 00:35

1 Answers1

5

This is possible using curl. Here you are a LINK1 to compile it on cocos2d-x library, and a EXAMPLE2 using cocos2d-x.

LINK1: http://www.cocos2d-x.org/projects/cocos2d-x/wiki/How_to_compile_libcurl

EXAMPLE2: http://www.jesusbosch.com/2012/08/internet-communications-with-cocos2d-x.html

MikelEiza
  • 116
  • 3