Facebook not working on ios

i was trying add Facebook in my cocos2d-js app. I was following this link:- http://cocos2d-x.org/docs/manual/framework/html5/facebook-sdk/facebook-sdk-on-ios/en

i have covered all the steps mentioned in this link, but when i was running my app it was generating this issue
The following build commands failed:

    Ld /Users/emp174/Desktop/project/demo/runtime/ios/demo\ iOS.app/demo\ iOS normal i386

when i run it on xcode i got 4 errors as mentioned below:-

Undefined symbols for architecture i386:
  “_GCControllerDidConnectNotification”, referenced from:
      -[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2d iOS.a(CCController-iOS.o)
  “_GCControllerDidDisconnectNotification”, referenced from:
      -[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2d iOS.a(CCController-iOS.o)
  “OBJC_CLASS$_GCController”, referenced from:
      objc-class-ref in libcocos2d iOS.a(CCController-iOS.o)
     (maybe you meant: OBJC_CLASS$_GCControllerConnectionEventHandler)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

i tried more and find this is issue is coming because i was doing this
Open target myProject iOS in the project root, open Build Settings page, then search for Other Linker Flags, and add -ObjC linker flag.
as mentioned in step 4 of upper link

when i remove -ObjC from Other Linking Flags my code compiles and creates build but my app doesnt run

can anyone help me in this issue

I get the same error after creating a new app with

cocos new mygame  -p com.your_company.mygame -l cpp -d NEW_PROJECTS_DIR

and adding the -ObjC flag

following

http://www.cocos2d-x.org/wiki/Facebook_integration_instruction_for_Cocos2d-x_and_Cocos2d-x-Lua_on_iOS

this fixes it

hey i got the solution
i added

  1. “MediaPlayer.framework”
    2.“GameController.framework”
    in build setting => build Phase => linkBinaries,
    This has resolved my problem .
    thnks pal for you effort