0

HI..

i want to implement facebook in my iphone game .. i want when game is over there is a facebook connect button .. using which a player can share his score on his wall in facebook .. i have follow the way which is describe in this video { http://vimeo.com/3616452 } but i am getting session not declare error .. so please help out

jcane86
  • 681
  • 4
  • 17
Haseeb Warraich
  • 141
  • 1
  • 2
  • 12

1 Answers1

2

This video is rather old. They use old facebook-iphone-sdk that is still working but Facebook recommend using new iOS SDK https://github.com/facebook/facebook-ios-sdk

It's a lot easier now. You can find sample project there and adopt it to you app.

I think you getting "session not declare" error because you didn't include facebook sdk header files in your project or Xcode couldn't find it if you SDK placed in another directory.

If you show us some code and better describe your problem it will be much easier to help you.

Anthony Pegram
  • 123,721
  • 27
  • 225
  • 246
Sergnsk
  • 3,305
  • 3
  • 23
  • 28
  • @sergnsk thanks alot i ll try and then let u knw .. thanks once again – Haseeb Warraich Apr 19 '11 at 07:25
  • dear i have follow this http://developers.facebook.com/docs/guides/mobile/#ios when i start my app its direct me to fb login n after login its not redirecting me... i just want to share score on user wall .. help neeeded – Haseeb Warraich Apr 19 '11 at 09:59
  • to redirect back in your app you need implemeting three things - 1. set up you appid in code 2. set up your appid in your app configuration plist as mention in help - fb[yourappnumber] 3. and!!! in *AppDelegate.m implement this method - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { return [[controller facebook] handleOpenURL:url]; } – Sergnsk Apr 19 '11 at 10:47
  • @sergnsk thanks for being kind... actually i want when game end then i give a option to player either he want to share or not if he is interested in share his score then he login and his score ll share .. hope u getting my point – Haseeb Warraich Apr 19 '11 at 11:19
  • yes I totaly get you point ))) you can do it. First of all you need to login to FB successfully and return to you app after that .Can you achieve this as I describe above? you can write me e-mail to s.sojik at google.com – Sergnsk Apr 19 '11 at 11:28