I have written a small web app with GWT and am looking into what it will take to make a "clone" of it on Facebook (as a FB app). After spending some time reading the dev docs it looks like a Facebook App is just a vanity canvas that points to another URL under the hood (via iframe).
All of the FB dev docs keep re-emphasizing PHP-centric development. Not that I have anything against PHP (!), it's just that I'd like to be able to point the FB app at my (existing) web app main screen and not have to re-write any code.
So... my question boils down to this: can I just iframe the FB app's canvas to my existing web app or do I have to totally re-write my app in PHP? Thanks in advance!
Like you said, it's just an IFrame, Facebook doesn't know what language you use. So you can use anything, although it has to support certain things like URL parameters.
The reason for the PHP documentation is because there is an an official PHP SDK, but no others in that area (There is a JS and smart phone SDK too), all other SDKs are third party.
Related
I've one website built in PHPFox. The website is functioning properly. Now the mobile apps for iPhone and Android smartphone are under development which will use the same database that PHPFox website is using.
So, I want to make the existing APIs that are used for a PHPFox website available to the mobile apps (both iPhone and Android) as well. I don't want to reinvent the wheel again and want to re-use the same existing code for mobile apps.
I did a lot of research about this. I've spent almost four days on the research. I didn't get a single link which will explain me how to access the existing APIs from a PHPFox website for mobile apps (iPhone and Android).
One option I found from my research is creating new RESTful webservices using PHP or implement any such framework like Slim, apigility, etc.
But I think following any of the above two approaches will be a overhead and re-usability of code will also not be achieved. If the code which is working fine for website should also be used used on mobile apps. There should be no need to write the same code again. That's what I think.
So using the existing APIs from PHPFox website is the best solution that I think, might be I'm wrong. If you think I'm wrong please correct my approach.
If you could explain with some useful example it would be really great.
I've gone through PHPFox docs as well but couldn't get anything useful which could help me in the issue I'm facing. If you are also interested in documentation of PHPFox please go to below links:
http://unity.moxi9.com/docs
http://unity.moxi9.com/kb
If you could find anything useful related to the issue I'm facing please do let me know.
Well everything you are looking for is already there in the docs. Your mobile app would be registered as an app with PHPFox. You can then use their API. The remaining question is, if the end users need to authorize your mobile app from their "normal" web browser or if this authorization can be performed from the mobile app as well. At least that's what I read from the docs. Since you have an up and running installation at your hand: Just try it! Register an app and perform some requests to their API.
I'd like to implement YouTube OAuth 2.0 on my application. I'd also like the user to have access to Google+ features at the same time.
Can someone (maybe even someone from the YouTube API team) tell me if I am reading the content on this link correctly?
https://developers.google.com/youtube/v3/guides/authentication
It looks like if I implement one of the recommended client libraries (thinking of implementing the one called "Google APIs Client Library for PHP"), the user will also have access to Google+ social network features.
Is this correct? I want to make sure I'm seeing this right before I go through the trouble.
Yes, the PHP client library supports all of Google's REST APIs including YouTube and Google+. Make sure you get the latest one and keep it updated.
I've seen this question earlier on your website, but it didn't quite help me out yet...
Here is what I'm trying to achieve:
I have a Content Management System (PHP) that is installed on the server of the various websites of my customers. Whenever a user posts a new message on his website, a shorter version of this message is sent to social media sites. Right now, this is possible with twitter (using the OAuth library). But I would want it to work with facebook too....
When I create an app in Facebook i HAVE to assign ONE return URL. But because the to-be-used CMS system can be anywhere, it's quite useless to me?
Or is there a way to make this work?
Best regars, Robert
I'm not sure your exact need for the return URL here. However, having the CMS communicate with Facebook from the server side would be performed with the Graph API with the OpenGraph protocol. This sounds like what you are doing with Twitter's OAuth.
You can then code your CMS to use your API credentials and never leave the CMS server. There is even a PHP SDK available for Facebook which sounds like it would integrate well for you.
If the CMS is at a different URL for each individual, then they each need to create an app on their Facebook profile to add the communication in this method. Because Facebook requires the basename of the URL to be the same by design, for security. This is typically performed by enabling the end-user to configure their own "app" in their profile for communication and is very commonly done with Wordpress applications for the same purpose.
I am somewhat confused by the facebook developers guide. Some tutorials show the javascript SDK being used while some show the PHP SDK being used. Do I need to load both of these? Are there any differences between the two (besides one being client and one being server)?
I am wanting to use Facebook's SDK for User Authentication, Social Plugins, and the Graph API.
The best advice I can give you - be very careful when planning a new development on the Facebook Platform. A lot of the documentation is seriously out of date, and this is exacerbated by sporadic platform revisions.
Admittedly, this has improved in recent months, but I digress...
Facebook have recently deprecated the creation of FBML canvas applications, which means your application will have to be in an iframe. This also implies you could make the applications available off of Facebook too (e.g., http://apps.facebook.com/someapp/ and http://www.someapp.com/ can both load up). This narrows the benefits of using the PHP SDK, as a lot of the functionality is available via the JavaScript API.
For SDK authentication you should use the Javascript SDK. It's much easier to set up things properly.
For the Graph API, it depends what kind of application you are going to build. If you are storing or processing stuff on the server side then you will have to use the PHP SDK.
You don't need to use an SDK for their Social plugins. You just have to copy-paste sample code in most cases.
Many tasks/calls can be done by javascript. I use both for my. 85% JavaScript and 15% PHP.
Reason: If you have an App with > 10000 dau's, the PHP SDK will suck sometimes, because every api-call needs at least 0.3s via cURL on my machine.
My Opinion: Use PHP SDK only if necessary
I want to build a phone app using phonegap that can access data on a mysql server that is backing a cakephp app. Can this be done, if yes then how can use phonegap to access data from a mysql server?
Yes you can!
You need too make the controllers of you cakephp to output views that can be interpreted by the javascript in your phonegap app. For a more detailed answer we need more information. i.e. what javascript framework do you want to use in the phonegap app?
Just to be aware, an app that is basically a web page will probably be rejected by Apple. Quoting from the Phonegap Faq:
Q. Can I just create an iPhone PhoneGap-based app that just loads my website?
A. You can, but as for Apple approving it, that's another matter, and they most likely won't. As a rule of thumb, if there is no Internet connection, you must at least load the UI (your views) without the corresponding data, and put an error notice to that effect. Therefore your app must have these views included in it. For a guideline, set your iPhone to Airplane Mode in the Settings, then load either the Maps, Weather, Youtube, ITunes or Facebook apps, and see what they do (have a "shell"). Apple is probably concerned about them approving your app based on your app description and functionality as promised by you, and then you turning around and changing it completely after approval to something undesirable.
Also see similar question: iPhone Phonegap based app load External website made of componentone