phonegap 2.2 and facebook integration - iphone

I have been recently begin working with phonegap and I notice that there is no tutorial for phonegap 2.2, the most recent version. What's more, since phonegap 2.0 there has apparently been drastic changes. I am having lots of trouble with using phonegap since I am new to web-iphone apps.
I am trying to make an application with phonegap to use facebook log in to get your data (pics, friends, etc) and then post on your facebook page, update status, etc. Basically a social App.
It seems that no tutorial is clear on any facebook-phonegap integration and social web based app.
I have seen a video with phonegap 1.8 tutorial and have followed it very close, only to get many errors.
I followed the one on:
https://github.com/davejohnson/phonegap-plugin-facebook-connect
and have had protocol.
I have tried many different things, but it seems that xcode simply is not able to recognize some functions or protocols. I am looking to see if I missed anything, but Ive added everything according to steps followed.
Ive tried adding the facebook.Framework, the extra headers, heck, Ive even added all of the files from the facebook SDK in the src file of the package:
https://github.com/facebook/facebook-ios-sdk
I cant seem to put together a simple facebook log in app...
anyone got it to work? what are the exact steps to follow? Im good with a new 2.2 cordova project and up until I put the files: FacebookCOnnectPlugin.h and .m that is where everything gets messed up.
I DO have the libsqlite3.0.dylib and HAVE followed the steps, added all the stuff in various .plist and all these weird long and annoying procedures many times...
Ive tried adding various libraries and just can't come up with anything else so why can't I just start a simple cordova project and get the option to log-in connect fb. like a simple hackbook sample.... I get it working in Objective-c demo (new single view application project)... Why does everything have to be so difficult and not working. I just want to get a page to start coding at. Just to get to this point, not even starting is so difficult.
very frustrating....
any help is much appreciated.
-- Im new to web apps and iphone...

I got it working but there are lots of issues and tweaks you need to do in order for it to fully work.
In my experience PhoneGap Plugins do work but you have to play around a lot. E.g. I know for sure the new Facebook SDK is not supported by the PhoneGap plugin. Even if you import the Deprecated Headers. I had to use the older version of the SDK. And also with version 2.7 not all plugins are supported so I had to stick to an older version 2.5 so I could get my project to work.
Even tough I got this plugin to work on iOS, it doesn't work on Android. It's a really good platform to develop on if you're looking for fast productivity but i'm still a bit spectacle on being heavily dependant on the plugins which are not being maintained continuously.
Hope this helps.

Related

Uber universal links not working reliably

Edit: Turns out the Uber app was botched - see answer below. Leaving this post as a reference for others.
I noticed that universal links I'm generating don't work reliably - I first thought it was only Android, but I'm also seeing this on iOS now.
Links like this one below just open in the browser when triggering the URL to be processed by the system (I removed the detstination and formatted addresses to get a minimal link, but it's still not working):
https://m.uber.com/ul/?action=setPickup&client_id=MY-CLIENT-ID&pickup[latitude]=47.5045573061129&pickup[longitude]=8.71492590755224
This is a Xamarin app, I'm just using the built-in Device.OpenUri(uri) method, which translates into a native call. That used to work in the past...
Turns out my Uber install got botched. I uninstalled and reinstalled Uber, and now the links are working again. Weird, but I'll just pretend that didn't happen ;)

Facebook login on Meteor mobile App (cordova)?

I'm looking to build a mobile application using Meteor+Cordova. Looking to get the Facebook login to work first. Apparently the default accounts-facebook package doesn't work so I looked around atmosphere and only found "particle4dev:cordova-fb", so I tried using that.
I'm a bit confused about the app developer stuff. Normally I just use it for my website so its quite straight forward. In terms of setting up the login details (such as ID and token), do I register as if it's an IOS app? Or do I still register as if its web?? It asks me to download XCode SDK for FB, is that what I'm supposed to be doing? is the package mentioned above what I should be using, or are there more mainstream options available?
I was also facing problem with accounts-facebook package. It was using in-app cordova browser and failing at the time of oauth handshake.
I added cordova:com.phonegap.plugins.facebookconnect#0.11.0 to app and enabled it for single sign on from developer account on facebook.
If you face any problem then please look at my blog here. I have written a simple tutorial.
If there are still some people to fix this thing, this may help them.
I've just used the latest version on github.
removing the plugin and adding it again like this:
meteor add cordova:com.phonegap.plugins.facebookconnect#https://github.com/Wizcorp/phonegap-facebook-plugin/tarball/d8b0f6935a7c6e586188bf85f9da88a1c160790b
This above code with particle4dev:cordova-fb worked like a charm on android and it should work on ios devices also. It seems they fixed the issue in their updates.
accounts-facebook package works fine. I just created a new project and tried, you can refer to this screencast http://recordit.co/7JNpDSzJ9m
if you are using accounts-facebook, you need to register the app as web on fb
So I've been trying to use particle4dev:cordova-fb for awhile now. For those who are confused about how to implement it. First you add it as a package to your existing app. Then you add the facebookconnect cordova plugin. Then you add the android platform. Then try and run the android platform (meteor run android --settings settings.json). This should fail. Now go through the steps on implementing facebookconnect on Android. This should make sure it works on android now. However even after doing all of this and getting it to work, it still simply opens up the in app browser on android for some reason.

ionic sidemenu on mobile browser not working smoothly

I am developing mobile web app using ionic sidemenu, but it is not as smooth as it should be. When I open sidemenu using slide left/right, I am getting less than 30 FPS as shown in figure.
How can I improve the performance?
Reaching 60 FPS would be great!
AppGyver's Steroids tooling also provides you with access to Crosswalk on Android. You can run it in your Ionic project directly without modifying any files.
Also, Supersonic's sidemenu/drawer is fully native, so if you're up for migrating, it'll run way faster. :)
(Disclaimer: I'm a programmer for AppGyver.)
My advice is to use Crosswalk instead of the Cordova as the webview for the app.
While both share the same end goal, they are different:
Cordova, from the Apache Foundation, uses the regular (pre-lollipop) Android webview, which is based on Android's stock browser since its inception.
The Crosswalk Project, created on the Intel Open Source Technology Center, is different. It wraps your app with Chromium, the open-source base code that gave birth to Google Chrome, which brings numerous performance enhancements: css3 transitions, animations, 3d transformations, html5 support, remote debugging and much better javascript support and performance.
At the time of writing, the Ionic team is already working on a beta version (1.3.0-beta1) that uses Crosswalk instead of Cordova. Not really stable just yet, but a huge promise.
In any case, you can use Crosswalk today, by manually copying your Ionic project's 'www'
folder content to the project folder inside Crosswalk folder and run it. You'll need to setup some manifest files previously, so read the docs.
In any case, it's not hard at all to try, and I'll recommend it everyday for all projects pre-Lollipop. If you're targeting Lollipop/Android 5 versions, you don't need it, because the default Webview in these versions is already Chrome-based.
Hope it helps.

Trouble integrating Facebook into iPhone app

I've been following this guide on integrating Facebook into my app. Everything is going well except for when I add in the Facebook SDK to my project.
I have added in all the code to enable SSO, however when I build and run my project I get loads of errors caused by the Facebook SDK:
I think it may be due to the sdk being out of date but I got it from the git page so I would have thought it should be compatible with iOS 5.
Maybe I need to carry out some extra steps when adding it into my project? All I did was literally drag and drop the src folder in (not the .pch and .xcodeproj files).
Please can someone help me out - I've tried searching for help online but couldn't find anything of use.
The SDK is outdated for the ARC yes. You have to turn off ARC for the SDK, check this answer out: How can I disable ARC for a single file in a project?
go to project navigator->Build Settings
set Objective-C Automatic Reference Counting to NO.

A working MGTwitterEngine iPhone example project

I'm trying to find a working version of the an up-to-date MGTwitterEngine iPhone project. The example app included with MGTwitterEngine is a Mac app which I can't get to compile, apparently due to multiple missing dependencies. (each time I try to resolve a compile error I just get even more errors...)
Is there a working example out there? Just a shell which lets you log in to twitter. (and which uses oauth, not xauth - which is deprecated).
The original source code is located on github. It looks like the last time it was updated was in September of 2010. I am not aware of any other updates as of recently. The original source is probably going to be your best choice.
Alternatively, there are many other Twitter libraries you can use.
Twitter+OAuth