How to implement RETWEET in ios 5? - iphone

I'm working on a project to integrate twitter with my iPhone app, and for now post tweet functionality has been achieved (big thanks to twitter frame work in ios 5), and I want to proceed to RE TWEET function, any help would be appreciated.
P.S-Thanks in advance :)

Issue a POST request to https://api.twitter.com/1/statuses/retweet/12354.json from TWRequest (see https://dev.twitter.com/docs/api/1/post/statuses/retweet/:id for documentation on retweeting via the API). (replace the 12345 with the ID of the tweet the user is retweeting)
See https://dev.twitter.com/docs/ios/making-api-requests-twrequest for more information on issuing REST API requests via TWRequest.

Add current date and time with re twitting message, another wise twitter does not receive same message again.

Related

Google Drive Sdk- Audio & Video Streaming in iOS Application

Hi Google Drive Staff,
I have tried to stream video files from Google Drive(Without Downloading). But I gets alerts that Sign In. I have went thoroughly with Dr. Edit sample App but i did not found any solution. I tried with downloadUrl , embedLink, webContentLink, alternateLink. All gives message to sign In. When i tried with exportsLinks i get a Null Message. What is the problem Here. If U have any suggestion Please Let me Know...
I have tried with Google Drive for iOS in iPod, there we can stream Video without Downloading.
Please suggest me to resolve this issue
Thanks in Advance...
I could solve it just by appending the access_token to the download url
audiofile.strPath=[NSString stringWithFormat#"%#&access_token=%#",downloadUrl,accessToken];
pass the strPath to your avplayer object to play music.
I did not try the video part. but i think a similar approach should work.
you can fetch the access token from the GTMOAuth2Authentication object
Note that you might need to refresh it if its expires.
Hope this helps you.
Regards
Nitesh
I think it depends what you mean by "stream". Last time I looked, the download links all had a content disposition: attachment header, which instructs the browser to download rather than render the content.
If you have your own client fetching the url, you can choose to ignore that header and do what you like with the content as it is fetched. imho, it would be nice if the client could add a parameter to the url to indicate to the Google servers that it wants the content to be rendered v. downloaded, but hey ho.
You need to authorize all requests to downloadLinks with an Authorization header. Read more about the authorization and learn how to retrieve your users an access token on https://developers.google.com/drive/about-auth

send facebook notification and then delete it using graph api

I am having a facebook app and the app_access_token for that.
and I am sending a notification to some user using graph api and it gives me success equals to true as the response.
Now, I want to delete the notification I just sent.
How is this possible.
Please, help me.
Thanks,
Amit Chaudhary
Amit, you can try the 'delete' method (in place of 'post' method, see https://developers.facebook.com/docs/reference/javascript/FB.api/) with the id of the notification using FB.api.
However, what is the procedure you have used to post the notification -- please provide clear step by step direction? This is still an open question here. Specifically, how did you get the app_access_token? Is there any reference that has the list and documentation of different types of tokens/permissions?

Facebook Publishing Score

I am trying to publish scores from my app. But unfortunately I am unable to do so. I even tried using the code snippet at http://developers.facebook.com/blog/post/539/ but for some odd reason it didn't work for me. If someone can provide me with some basic guidelines I would really be helpful as that would help me build upon that system and move forward. I don't want any fancy publishing technique I am just looking forward to publishing score at the end of the game.
Using https://graph.facebook.com/user id/scores?score=10&access_token=acess_token returns
{
"data": [
]
}
Your example looks like a HTTP GET request (i.e. 'show me the scores of this user')
To update a score you either need to make a POST request, or 'fake' the POST request by adding ?method=post to your GET call
You'll also need to use an App Access Token, the instructions for obtaining this are at:
https://developers.facebook.com/docs/authentication/#applogin
I've done it using javascript sdk, you can check out the source code for my game
https://apps.facebook.com/tgif-game/
you should be checking out scripts/gameui.js for the calls to posting scores and getting the list of scores.
In the FaceBook Developer Dashboard set your app category as games.
Then only you'll be able to post scores.

how to integrate twitter followers in iphone with all detail?

i have integrated twitter in my iphone App successfully and posted twits but in addition i need followers list with detail so how can i get my following and followers detail specially email id.
there is any API available or not for Followers and Following i search but i m getting no idea ..Please let me know if any one have any idea.
Thanks...
People following you(user)
https://dev.twitter.com/docs/api/1/get/followers/ids
example call : https://api.twitter.com/1/followers/ids.json?cursor=-1&screen_name=twitterapi
People you(user) are following
https://dev.twitter.com/docs/api/1/get/friends/ids
example call: https://api.twitter.com/1/friends/ids.json?cursor=-1&screen_name=twitterapi
. . . but you won't be able to get their email I.D's. This is private and privlaged information unavailable to to developers using the Twitter API.

facebook chat on the iphone using xmppframework

Well i started of by following all the instructions here:
http://code.google.com/p/xmppframework/wiki/FacebookChatHowTo
I used the recommended fork of the facebook api and tried the latest from:
https://github.com/facebook/facebook-ios-sdk/
My problem starts with the following error:
< failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">< not-authorized/></failure>
The error is a reply from facebook to xmppframework s response to a authentication challenge. The response that is made by the iphone is base64 encoded msg when i decode it i find 2 of the values are null:
api_key=(null)
and the
session_key=(null)
This is obviously the reason facebook is returning that error. But the problem i have is i cant seem to find any where to set these values in the framework. Besides i think the session_key should be pulled in from facebook anyway.
I guess what i want to know is a couple of things.
Has any one got the xmppframework working with facebook on a iDevice?
If you have got it working did you have to stray from the path of the instructions on http://code.google.com/p/xmppframework/wiki/FacebookChatHowTo ?
do you know of any other method to get facebook chat working on the iphone?
Any suggestions or help for my current dilemma would be appreciated. Happy to share my code if you want.
cheers
I wrote the Facebook integration for XMPPFramework. The api_key and session_key, come from a call to auth.PromoteSession. Facebook is trying to deprecate that call, so to enable it, you must follow step 7, in the HowTo:
Under Migrations, change Disable Deprecated Auth Methods from Enabled to Disabled and Save Changes.