Display content after tweet? - twitter

simple question but I can't seem to find an answer online. (which would probably imply this isn't possible).
I know content can be shown/hidden from users depending on if the liked the page on Facebook or not.
Can the same thing be achieved via Twitter?
EDIT:
basically, is there a way to sue the Twitter API to make a tweet (by an authenticated user) and get a postback info whether or not the tweet was successfull or the user closed the popup?

Related

Twitter API How to know if a user is following another user?

I made a follow/following button so I need to know if the user A is already following the user B.
I know I can get all his/her friends with GET friends/ids but I'd like to know if there is a shorter way (without looping on the whole list, with cursors, etc.).
(Additional info: I'm using the iOS SDK)
Twitter API has a dedicated endpoint for this situation: friendships/show
The answer will give you all the information about the relationship between these two users, you just need to specify their screenname or user_id.

Facebook SDK iOS invite user without FBWebDialogs

I want to get list of my friends from Facebook who are not users of my app, and be able to invite them.
Using FBWebDialogs I can pick users, but I'm wondering how foursquare did it?
Screenshot:
There is option of frictionless requests.
On Facebook developer site they mentioned in section of Invites and Requests
We touched on a scenario where users exchange requests back and forth. If this scenario is typical in your game, it can be a bad user experience to force them through the request dialog every time they want to send a request. The solution for this is frictionless requests.
Frictionless requests let users send requests to friends from an app without having to click on a pop-up confirmation dialog. When sending a request to a friend, a user can authorize the app to send subsequent requests to the same friend without another dialog. This streamlines the process of sharing with friends.
For more reference see Facebook Invites and Requests
You are asking two questions here:
How to invite Facebook friends without web dialogs?
Unfortunately, the web dialogs you are referring to are the best way to send invites to friends. There was a time when we had to resort to ugly hacks just to get this functionality in applications. Facebook added this functionality to iOS SDK after developers created bug reports and were literally behind them.
Get a list of friends who are not using the app and invite them
Foursquare IMO is not using the requests API. What they do is, whenever somebody links their Facebook account to their Foursquare account they make a note of the users friends who are using/not using the app. This is possible if the user grants the app permissions.
Then in the invite screen, they simply build a UITableView with list of friends who they think are not using the app. When you tap Invite they will just send an email invitation and not the Facebook request you are referring to.
I think FourSquare syncing the user's friend list(friend ids) to its own server.. Then after they are checking it to create the custom interface like the screen shot you shared.
Maybe I didn't get the question right, but from what I know after you tap the invite button on Foursquare the Facebook invite dialog (apprequest) will pop up.
In general this dialog will let you select friends if you didn't specify any friends ids before presenting it, or show you the selected friends like in Foursquare example.
There is an API to get your FB friends, so it's possible for your server to check witch of then already has the app...
I've been researching this for a while and the main solution I have found is frictionless requests, as Rahul Patel noted. You can do a direct request to the graph API and see who has your app installed.
From there you could fairly easily implement any sort of filtering. For example, using the Friend Picker UI Control and implementing the method friendPickerViewController:shouldIncludeUser: and checking against a list of facebook ids who are not on the app that you cache somewhere else in your application and actively update it (for example in a simple core data model that is updated when appDidFinishLaunching), returning no if the user is not displayed. This would only allow users to select individuals who are not on the app, and then you could send a request to them under the hood with frictionless requests.
I do think that it is not a great idea to spam people, however, without at least allowing them to check the names of their friends, or see who they are.

Twitter Framework on iOS - Posting Tweets

Since the Twitter Framework handles the login authentication, does that mean I can freely post a tweets to the user's wall?
Since logging into twitter through the settings page gives permission access to all games, what if some games abuse it and spam a user's twitter page? If the user gets spammed and wants to block only that game, is that possible?
My game will be doing automatic posts whenever a user accomplishes something, should I be asking for permission every time before posting a tweet? or should I simply post a tweet and hope it's not seen as spam?
You can show the tweet dialog to the user, and that would post it for you. It is fairly easy to do this, here is a great tutorial for how:
http://www.raywenderlich.com/21558/beginning-twitter-tutorial-updated-for-ios-6

Twitter related issue

I am providing a facility where a user can tweet a content along with the url from my site (and it's working fine), but after tweeting from my site I am getting no response from twitter.
My question is how do my system will know whether user has posted on twitter or not?
It would be really great if someone could help me.

Using oAuth to retrieve tweets of a particular ID (equivalent to a page in facebook)

I need to know as to how to implement oAuth in an iphone application.
I have already gone through lot many posts but none of them shows as to How to retrieve tweets from a user profile (like we access facebook wallposts). I tried using an example named bengottlieb/Twitter-OAuth-iPhone but all it does is show the Login prompt and posts a sample Twit at my Twitter profile.
I need to make an application where
the user can view twits for a particular page (same as accessing the wall post for a Page)
Post tweets that will appear on his profile or if possible then also at the profile page for given ID
I was able to fetch the tweets for a particular id using http://search.twitter.com/search.json?ID but may be due to closing of Basic authentication it does not return to me tweets older than a specific time period.
The Twitter search API is not meant to retrieve the tweets from one particular user, even though it does seem to work (up to a certain point back in time). As far as I know the search API does not need authentication, so you're not in trouble regarding the deprecation of Basic authentication there.
To retrieve the tweets for a user, you need to retrieve their timeline. Be sure to use OAuth authentication, as indeed Basic authentication no longer works now.
Check out http://dev.twitter.com/ for more information. The API is documented quite well. You mention basic authentication, so perhaps you could start with http://dev.twitter.com/pages/basic_to_oauth to get you going?

Resources