How to add the Facebook Like Button in the end of scrollView? - iphone

I am working with navigation based application. Every cell creates a detailView. i have 3 text views in detailView which show title, date and description. I put there textViews in a scrollView so user can scroll them as a single view. Now i want a facebook icon in the end of scrollView. If that icon is clicked and user is already login on facebook, that facebook page should be liked automatically. and if user is not login, it should ask for account information. I am quite new in this and this is my first app. i tried to explore developer.facebook.com but couldn't get that functionality. Can anybody help me with this? thanx in advance.

To implement the button itself, you'll add a custom UIButton to your application using the Facebook Like graphic as its image.
Your selector that handles the touch event will need to handle the NSRequest. You'll need to find out if the user is logged in or not. If the user is logged in to Facebook, your selector will make an NSRequest to Facebook's API for liking the Facebook page. If the user is not logged in, you'll need to instead provide the user some UIView that will handle authentication with Facebook. When you know authentication is successful, you can then issue the NSRequest to the Facebook API for liking the page.
For more information on using the Facebook API in your iOS application, you should check out Facebook iOS SDK at https://github.com/facebook/facebook-ios-sdk. Facebook's iOS SDK includes authentication and extensive API support to help make your job easier.

Related

How can I create this Popup and check to see if user has Allowed App?

How would I create a popup on my website that shows up (that blocks the website's content) only if the user hasn't yet allowed my Facebook app? The popup should not come up if the user has already allowed the app, and the popup should have a button for users to allow the application and then go away when the user does allow the application.
For an example, see here.
Take a look at FB.getLoginStatus
That page pretty much explains it... If you get not_authorized then have a button to authorize your app.
If you get unknown have a button to log in to facebook then recheck
If you get connected show your page.

Facebook iOS SDK - UIWebView dialog for login - how can user manually cancel?

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.

Manual Login Functionality for Twitter to make a tweet only in iphone sdk

I have made a tweet Functionality in my Application.
Its working fine.
now I don't want twitter Default Authentication (ie.login) Screen for login.
I want to put my custom login screen which has two text field of username and password.
and one tweet button.
now on tweet button click I want to direct post tweet on twitter like old twitter modules.
I heart that its done using Xouth .
if it is possible then any code or links for that??
I want any solution for that???..
it is happen in BBC ipad App.
For Manual Login , you need Xauth Twitter Access ,
refer these source codes & Links,
http://code.google.com/p/tweetero/
https://github.com/aral/XAuthTwitterEngine

How to share text to Facebook

In RootviewController of my application I have a textfield and a button. I write something in that text field and after that when I click on the button then that text should be shared in Facebook. How to do this??
i think you need to integrate FB in your app to post your comments...
You must integrate Facebook SDK in order to do anything in user's account from iPhone app. After integrating and login You need to ask for permission "set_status" and after that you can show dialog for "set_status". That will show what exactly you want.

FBConnect logout button

I am using the FBConnect lib to allow users to post data to their facebook pages. I was successfully able to establish a session and allow a user to post to their wall.
My question is this:
There is a facebook 'logout' button that is suspended in the top left corner of my view after I've logged into facebook. How do I disable or move this button? I did not find any documentation in the api that this button would appear.
Need some advice on how to manage this mysterious button.
Thank you in advance,
In the FBConnect folder in your xcode project, you should have a FBDialog.m with a initWithSession:(FBSession*)session in there you should find everything about the facebook login and logout buttons including the .png images that they point to.
Hope this helps.