PDA

View Full Version : Deleting post on twitter from iphone




arnieterm
May 18, 2009, 09:46 AM
I am be able to post a message on twitter site from within my iphone application and also getting the id of the posted message
I have also to implement a process where when user touches a button then I need to delete the post on twitter using the ID of the message received previously
Can anybody tell me how to do this?
I am using NSMutableURLRequest to send request to twitter site

Also one more thing I have noticed that event if I specify my application name in the request to send still then I always see
"from web "in the source [on twitter site] that indicates from where the current message comes from
The code snippet that specifies source is as given below

NSString *body = [NSString stringWithFormat: @"source=MyAppName&status=%@", tweetMsg];

Any idea?
Thanks



jnic
May 18, 2009, 09:52 AM
The destroy method of the Twitter API wil delete a given post by ID.

http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses%C2%A0destroy

Peter Maurer
May 19, 2009, 02:56 AM
I have noticed that event if I specify my application name in the request to send still then I always see
"from web "in the source [on twitter site] that indicates from where the current message comes from
The code snippet that specifies source is as given below

NSString *body = [NSString stringWithFormat: @"source=MyAppName&status=%@", tweetMsg];

Any idea?
Thanks

Read this (http://groups.google.com/group/twitter-api-announce/browse_thread/thread/ce57405a08483877/077165f18da99ff7?lnk=gst#077165f18da99ff7) and follow the link to the Twitter FAQ that's in there. Short answer: The "from" parameter will not work for those who are new to this game.

BTW, from my experience, the Twitter FAQ are very helpful in a lot of regards, so it's a good idea to check them whenever you have this kind of question. :) Oh, and there's also a Twitter API mailing list (http://groups.google.com/group/twitter-development-talk) where this very question has actually been asked repeatedly.

arnieterm
May 20, 2009, 07:47 AM
According to the FAQ, I have registered an application [my iphone application] that will send messages to the twitter with the below given details
Application Type: Client
Default Access: Read & Write
User Twitter for Login: Yes
I replaced the Application Name entered in the registration with my app name and that very same app name I am passing in the "source=myappname" but it still continues to show up
"from web"
What more things I am missing?
Thanks
Arnieterm

arnieterm
May 25, 2009, 08:29 AM
Does anybody know whats going wrong with me when it comes to
source= [my app] setting. I am still getting "from web" though I am successful in deleting an existing post
Still helpless with regards to the source parameter.
Thanks
Arnieterm

lonniepaiz
May 26, 2009, 05:28 AM
Read this (http://groups.google.com/group/twitter-api-announce/browse_thread/thread/ce57405a08483877/077165f18da99ff7?lnk=gst#077165f18da99ff7) and follow the link to the Twitter FAQ that's in there. Short answer: The "from" parameter will not work for those who are new to this game.
BTW, from my experience, the Twitter FAQ are very helpful in a lot of regards, so it's a good idea to check them whenever you have this kind of question. :) Oh, and there's also a Twitter API mailing list (http://groups.google.com/group/twitter-development-talk) where this very question has actually been asked repeatedly.
I completely agree with Peter..I also think so..That can help you..