Can any one suggest how I could remove the cancel button next to login button in the Facebook graph API for iPhone. Where does the code lie?
The default answer is you can't, its a web page in a WebView by Facebook.
But since Facebook iOS SDK is open sourced. You can actually inject javascript into the WebView to remove the button using this function.
- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script
But this method is probably against the policy of Facebook so do it at your own risk.
Even if possible to do so programmatically, facebook terms and conditions do not allow us to alter the UI from the facebook graph api.
Also, altering the UI may render the common user confused..
So, its advisable not to do so..
Thanks!
Related
Is there anyway we can show a preview for Facebook's custom stories for users before they posting on their timelines?
If not something provided by Facebook, is it OK if we implement the same CSS/HTML code that Facebook uses or there are restrictions on doing this?
Thank you
There's nothing such default preview method, but yes you can implement this if you want. There's no such restrictions in doing this.
In fact, they prefer showing user the story somewhere in the application that you are going to publish on their behalf.
I'm having a problem here. I've modified a portion of the source code to prevent my app from launching the Facebook app or Safari for authentication. Instead, a UIWebView will be displayed as an overlay on my app.
However, in the dialog. I noticed there isn't any CANCEL button. Which makes me wonder what happens if the user decides not to login.
I had forgotten to copy the FBDialog.bundle over to my project! ahh!
Are you using FB graph API for facebook login.? If yes,
Then the view that you see for login is programmatically created.
Look into the FBGraph.m for its implementation.
There you can add a cancel button and add your cancel logic there.
Can any one suggest how I could remove the cancel button next to login button in the Facebook graph API for iPhone. Where does the code lie?
You shouldn't be doing this - messing around with the login dialogs is a big no-no for Facebook. The whole point of the SDK is that login dialogs look uniform across all applications.
Previously i used the JavaScript API for Facebook Connect, so i had the fb:login-button XFBML tag, which when clicked would perform the login.
But now, i'm using OAuth authentication (server-side), but i still wish to have the button (which when clicked, would simply redirect to the URL on my server which does the OAuth stuff).
Is this allowed?
Can i simply style a regular anchor/button to look like the Facebook login button?
I don't want to have to include the Javascript SDK library simply to render out the button. I don't care about the code behind the button, just the UI.
FYI - i'm using the Facebook C# SDK.
Yes, what you are doing is allowed. I would suggest taking a look at the tutorial I posted which does almost exactly what you are talking about. You can find that tutorial here. No need for the Javascript SDK for that scenario.
The Like Button seems like a very specific, and not very elegant in my opinion, solution to allowing users to post a web page to their Facebook profile. You have two options: 1) Use the iFrame solution, which allows very little flexibility in functionality, integration or appearance or 2) the XFBML solution which requires loading the entire Facebook javascript SDK just for one little "share this" button.
Is the Like Button the only way that is currently supported by Facebook to allow sharing of content to a user's Facebook profile? It seems to be the only method mentioned anywhere in the Facebook developer documentation, and I've had trouble finding any alternatives elsewhere on the internet.
There was a service called Facebook Share:
http://www.facebook.com/sharer.php?u=<your url>&t=<your title>
I guess it's still working but I'm seeing people having troubles using it and Facebook is forcing developers to use the Like Plugin.
Now:
Most likely your visitors will have the Facebook JS Library cached on their browsers
Facebook uses CDNs and their servers are super fast
Even if it doesn't fit in your design, don't forget that users are used to it
You can create a Facebook Application and use the Graph API but it's way more complicated
Don't use their services!
Actually, Facebook share is the simplest and most natural solution to share content on your FB profile.
You may want to read this article.