开发者

How to Add Phone With twitter using Third Party tool

开发者 https://www.devze.com 2023-01-26 04:54 出处:网络
I need a script that will add my phone with Twitter for All latest n开发者_Go百科otification. I found this page Twitter but i need to create script for my own application.

I need a script that will add my phone with Twitter for All latest n开发者_Go百科otification. I found this page Twitter but i need to create script for my own application. I goggled but i didn't get any solution For this.Please Help me to find this answer.

Thanks a lot in advance.

First Edit

This is a twitter's new feature Send notification to Phone. Actually I want to create an app that will allow users to register there phone with twitter via my application. Ie I need a script to implement send notification to phone.


The question that others are asking you Pankaj is what platform is your application being written for. You keep saying you want a "script" to do this, but what kind of script?

Giving us more insight to what your application is (a console application written in C#, or an ASP.NET web application) would lend more detail and raise the chances of someone being able to help you. :)

Regardless of your app's platform though, you're probably going to need to look into the Twitter API for setting this up. This is the normal method to interact with Twitter from 3rd party applications. So all the suggestions above, specifically the list of API's available, is probably what you're looking for.


Hey, can you give some more information? What kind of Phone are you developing for? Maybe that helps solving your Problem. If you are just searching for a way connecting your Phone to Twitter, here is the Twitter FAQ for Phone connecting: http://support.twitter.com/articles/14014-twitter-phone-faqs

Maybe it helps, or give you more keywords for your search.


I don't believe there's a way to get or set the notification phone number using the API, however if a phone is already setup on the profile you want to configure, you can do the following to get notification from all user friends.

The user will need to authorize your application to access her account. This flow uses OAuth, and begins here:

http://api.twitter.com/oauth/request_token

Once the user has granted your app access, and your application has all the required OAuth credentials, turn on notifications using account/update_delivery_device:

http://api.twitter.com/1/account/update_delivery_device.json?device=sms

Next, fetch all the IDs for your user's friends using the friends/ids API call. Be sure to study the documentation; this call uses cursors, so you will have to manage those if the user has over 5,000 friends. Store these IDs for use in the next step. Here's an example call:

http://api.twitter.com/1/friends/ids.json?cursor=-1

Once you have all of the friend IDs, you can call notifications/follow repeatedly to enable notifications on your mobile device whenever your friend makes an update:

http://api.twitter.com/1/notifications/follow.xml?user_id=12345

This approach will burn one API call for each user that you enable notifications for; there's no way currently to manage notifications en masse.

0

精彩评论

暂无评论...
验证码 换一张
取 消