1

I am using phonegap facebook plugin.

When I tried to login from my app, fbAppAuth dialog and safariAuth occurs at the same time.

So, although I finished safariAuth , fbAppAuth dialog appears. I need to turn off one of them

and found solution from below link.

How to authorize user through a DIALOG with the NEW Facebook Connect iOS API?

But, I need to modify facebook.m file which is I don't have. I am using facebooksdk.framework 3.1

and there is only facebook.h file but no facebook.m file.

How can I find facebook.m file from my project? or.... is it something I should download?

any help will be appreciated..

Community
  • 1
  • 1
Seho Lee
  • 4,048
  • 9
  • 32
  • 42
  • I have the source using ShareKit. But it seems like there's no longer a way to force authentication through WebView. Plz update if you find a solution. – Yariv Nissim Dec 24 '12 at 02:58
  • I am using childbrowser to force authentication through webview. basically childbrowser pops up another webview and procceds serverside authentication. – Seho Lee Dec 26 '12 at 01:22

2 Answers2

1

The new FacebookSdk.framwork is in form of static library which you can't update or change and you have to use as it is.

But if you want to update facebook.m then you download sdk source from github where you can found the source files for the sdk where you can update files whichever you want. I am giving link below from where you can download the source.

https://github.com/facebook/facebook-ios-sdk

Optional:-(if you getting error with iOS 6.x) once you download the source then open the Facebook-ios-sdk project file and build the files using armv7 and armv7s architecture if you want to use sdk with iOS 6.x

robin.cssoft
  • 136
  • 6
1

In FBSession.h the enum FBSessionLoginBehavior is what you're looking for.
Replace all occurrences of the other values with FBSessionLoginBehaviorForcingWebView to force FB to open a WebView.

This took me hours to figure out. I hope this helps you.

Yariv Nissim
  • 13,273
  • 1
  • 38
  • 44
  • so.. this means.. I can force webview without using childbrowser? can you tell me where should I put this FBSessionLoginBehaviorForcingWebView(looks like integer 2) value? I am not familiar with object-c and I am not sure where this enum value is used.. or can you post your FBSession.h? I would be very appriciated – Seho Lee Jan 24 '13 at 04:08
  • Look for the enum name in your project, it is the prefix for all of its values. then replace each value (not just the prefixes) with the new value. ** Obj-C is a bit of a requirement to develop iOS apps. you should work on that if you want to understand the answers you'll be given here. – Yariv Nissim Jan 24 '13 at 20:40
  • did you figure this out? if not, let me know and I'll send you the updated file – Yariv Nissim Feb 14 '13 at 05:40
  • no... I am still forcing a serverside authentication to get a facebook token. can you send me an updated file if possible? making own fb post, login, logout, getloginstatus function is too exhausting. your help will be very grateful for me. – Seho Lee Feb 16 '13 at 01:25
  • sure. send me a private msg with your email – Yariv Nissim Feb 20 '13 at 02:19
  • it looks like there is no msg function in stackoverflow.. can you email me at ratm0424@hotmail.com? I would be very appreciate for it. – Seho Lee Feb 20 '13 at 03:20