Code Monkey home page Code Monkey logo

Comments (9)

pamelafox avatar pamelafox commented on July 21, 2024

I'm getting a redeclaration of enumerator issue when using PhoneGap and the Facebook SDK, occurring in SBJsonBase:
http://dl.dropbox.com/u/10998095/Screenshots/7l.png

Is that issue also meant to be fixed by that commit? If not, is there a suggested fix? I'm new to ObjC/iOS development so I'm not sure best way to resolve the conflict. Thanks!

from phonegap-facebook-plugin.

pamelafox avatar pamelafox commented on July 21, 2024

An iOS developer walked by me and helped me out with getting it working.

I had to: comment out the enums, and then comment out SBJSONErrorDomain in Facebook's JSON (easier than fixing in PhoneGaps).

from phonegap-facebook-plugin.

shazron avatar shazron commented on July 21, 2024

Sorry @pamelafox - yeah unfortunately your last comment was the fix. We're not fixing the issue since we are removing SBJSON entirely and using JSONKit. The bleeding edge version here (as of today) http://github.com/callback/callback-ios has this new use of JSONKit which will not conflict with FB Connect.

from phonegap-facebook-plugin.

sromalewski avatar sromalewski commented on July 21, 2024

I installed the latest trunk of callback-ios (PG 1.2.0) from http://wiki.phonegap.com/w/page/40796976/Install%20the%20latest%20%28trunk%29%20source%20of%20iOS%20PhoneGap and followed the instructions for the Facebook Plugin at https://github.com/davejohnson/phonegap-plugin-facebook-connect.

I created a basic project just for the FB plugin, and when I build it I still get errors. JSON.h file doesn't exist. SBJSON undeclared. jsonParser undeclared. These are in the FBRequest.m file, the FBConnect.h file, and the FacebookConnectPlugin.m file.

In the Facebook Plugin instructions, it says (step 17) "From your Plugins/FBConnect folder, remove the JSON folder (remove reference only)". But if I add this back in, then the app builds without errors. Very confusing.

But now that the app is working, I load the example html from the Facebook plugin, and the login button takes me out of the app to a Mobile Safari browser (in the simulator). At first I get an error from Facebook, but it gives me an "Okay" button which I press, and then it takes me to my Facebook wall.

But the app doesn't think I'm logged in.

Any thoughts on what's wrong? (whether it's me, the plugin, or PG 1.2.0)? I'm bewildered. Thanks!

from phonegap-facebook-plugin.

maxogden avatar maxogden commented on July 21, 2024

Can someone (@shazron) explain why this is necessary? davejohnson/phonegap-plugin-facebook-connect@ab8ecc4#L0R73 (removing the JSON folder from FBConnect)

FBConnect from facebook-ios-sdk depends on SBJSON (https://github.com/facebook/facebook-ios-sdk/blob/master/src/FBConnect.h#L22) so why would you want to remove SBJSON? in Phonegap 1.2.0 I experienced the same issues that @sromalewski explained, however my app works fine after adding back the JSON folder that the readme had originally told me to remove.

from phonegap-facebook-plugin.

shazron avatar shazron commented on July 21, 2024

@maxogden
It was required pre-1.2 because PhoneGap had SBJSON symbols in there as well - and it would not link. In 1.2 we removed SBJSON and are using JSONKit instead (because of licensing issues - JSONKit is Apache 2.0 licensed while SBJSON is not).

from phonegap-facebook-plugin.

maxogden avatar maxogden commented on July 21, 2024

@shazron thanks for the clarification, but i'm still not getting how we are resolving the dependency that facebook/facebook-ios-sdk has on SBJSON, e.g. it comes with it's own copy of SBJSON so unless we fork their sdk to upgrade to JSONKit I don't understand why we are removing the copy of SBJSON that comes with the facebook-ios-sdk.

from phonegap-facebook-plugin.

shazron avatar shazron commented on July 21, 2024

@maxogden removing it only applies to the old PhoneGap version, with the new PhoneGap version that includes JSONKit, removal from the facebook sdk is not required anymore.

from phonegap-facebook-plugin.

maxogden avatar maxogden commented on July 21, 2024

@shazron gotcha. then we should edit step 17 from the readme: 'From your Plugins/FBConnect folder, remove the JSON folder (remove reference only)'

from phonegap-facebook-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.