Implement the facebook connect on uiwebview using HTML5/JavaSCript for iphone sdk - iphone

I need to implement the facebook connent on UIWebview using HTML5/ Javascript. Presently what I implemented is working fine on iphone safari but not in native application. Please Suggest. Thanks

when the app loads up have it open a web view that point to a website that does what you want it to. see facebooks graph api documentation for web apps/websites

I'm working on this kind of app also. I haven't finished it yet but after googling I found just this link that seems to work with UIWebView
http://suhinini.me/2011/05/24/embedding-facebook-social-comments-plugin-to-an-ios-application/
I've tried the HTML5 code on the comment plugin page but it doesn't work. The UIWebView just shows nothing.
I'm still looking for the best solution.
edited
Ok now I got my app working. What I did was creating a HTML file, containing the code from facebook comment plugin page, and put it in my project (I think this should work fine with file on server also). I use this
[UIWebView loadHTMLString:baseURL:]
since my HTML file is local.
This is the facebook comment plugin page
https://developers.facebook.com/docs/reference/plugins/comments/

Related

GWT application on Facebook

How can I publish my GWT application on Facebook?
EDITED:
Facebook requires from the application to have some FacebookSDK configuration in <body> tag on index.html page.
The GWT-generated index.html doesn't contain the <body> tag at all, (it has <bodies> instead o_O ).
How do I do that?
I tried to add these lines to the <bodies> tag and upload app to facebook, but when I click "next" on App QuickStart page I get "Something went wrong. We're working on getting it fixed as soon as we can." Facebook popup.
The app is generated by libgdx and works perfectly in browser on my own server.
Is there better way to publish GWT app?
There are some docs and question here and there, but it looks like they are related to old approach. Thanks!

Facebook form app inside iframe loses cookies for Safari browsers in Windows platform

I have a facebook app built using iframe. It works ok on most modern browsers except Safari on Windows platform. On Safari windows platform, the cookies seem to get lost as a user move from initial form page to 2nd page with questions.
Here is the live link
http://on.fb.me/1hCfgOX
Can someone help me on how to fix this?
Ok, i found a fix for it which works perfectly. Checkout the following links:
Safari 3rd party cookie iframe trick no longer working?
Facebook Iframe App with multiple pages in Safari Session Variables not persisting
And
http://lightyearsoftware.com/2009/11/on-the-pain-of-developing-for-facebook/
I hope this will fix your issue also, as it fixed mine. If you got any problem, let me know.
Thank you
besides header, you might also need to add w3c/p3p.xml and w3c/policy.p3p files to your website. See here for more details and sample files: Session null in IFrame in ASP.net MVC only in safari browser

How to add new html5 like buttons in website

I'm relatively new to this and looking to implement like buttons for videos and articles on a website. I would prefer to get the better functionality from the html5 option over the iframe option. Not sure what I need to do as far as creating the app, getting app ID, and what I need to add to the site from the SDK in addition to the HTML5 code generated on https://developers.facebook.com/docs/reference/plugins/like/ when I put in all the info.
Is there a step by step guide somewhere that I can follow to implement this correctly?
Here's Facebook's Open Graph protocol. There's a Getting Started section with all of the info you need. Just follow the instructions and your site should work fine.

Facebook Application Tabs

I want to apply application tabs on my facebook application just like in following application:
http://www.facebook.com/artofnonconformity
I am unable to find any answer.
Please guide me on this
Thanks,
Pankaj
If you're building an FBML app, you can simply use the fb:tabs and fb:tab-item tags in your markup.
If you're building an Iframe app, you'll have to build tabs the normal way, using HTML markup and CSS. There's lots of examples out there that you can google for that to get the exact stylings.

Facebook tab application scripting

I have a web application that I am trying to port to Facebook. The app uses a few external javascript files. So initially I wanted to create an iframe Facebook application. However, it turns out that you cannot use iframes when creating a tab application(which is a requirement). By tab application I mean placing your app on the profile page next to the wall, info, photos, ect. tabs.
Does any one know of a good tool to help convert my javascript to the FBJS scripting? Or better yet does anyone have a work around so that I can include my own javascript in this tabbed application?
Thanks for the help.
From my understanding loading external js is disabled when the user first visits the tab page (the passive page). But, once a page loads and the user interacts with it in some way (ajax post, redirect) the page is "active" and you can run flash, javascript, etc...
If you're using Ruby on Rails and Facebooker, I wrote a nice little tutorial on how to inline your javascript inside a profile tab while keeping your code DRY :
http://modelix.net/2010/03/javascript-inside-a-facebook-profile-tab/
I thought you might find this interesting, how to add a Live Chat Tab to a Facebook page:
http://apps.svpn.com/live-chat-tab-for-facebook-pages/