The problem I encountered was connecting Facebook to the cocos2d-x Project (iOS platform). below this articleArticleI have already said this very well. Read it first.
Http://blog.csdn.net/xiadasong007/article/details/8599611
Here we need to record two problems:
1. There is a URL types parameter in info. plist of the project. This parameter should be -- FB + appid. For example, if the Facebook appid you applied for is 23456, enter fb23456 here.
2. the login interface is successfully called, but the callback function is not called back. The reason is that your application does not process the system's Openurl message. In the appcontroller. MM file, reload this interface:
-(Bool) Application :(Uiapplication*) Application Openurl :(Nsurl*) URL sourceapplication :(Nsstring*) Sourceapplication annotation :(ID) Annotation
{
Return[Fbsession.Activesession
Handleopenurl: Url];
}
Set the session you are processing to activesession. facebooksdk has a special function.