[Migrated content. Thread originally posted on 31 March 2011]
Hi All,Does any one know how to call Twitter as a web service to read and write info from with in Visual Cobol?
Thanks
Neil.
[Migrated content. Thread originally posted on 31 March 2011]
Hi All,[Migrated content. Thread originally posted on 31 March 2011]
Hi All,Neil Willby originally wrote:
Hi All,
Does any one know how to call Twitter as a web service to read and write info from with in Visual Cobol?
[Migrated content. Thread originally posted on 31 March 2011]
Hi All,Neil Willby originally wrote:
Hi All,
Does any one know how to call Twitter as a web service to read and write info from with in Visual Cobol?
[Migrated content. Thread originally posted on 31 March 2011]
Hi All,Neil Willby originally wrote:
Hi All,
Does any one know how to call Twitter as a web service to read and write info from with in Visual Cobol?
[Migrated content. Thread originally posted on 31 March 2011]
Hi All,
$set ilusing"tweetsharp"
$set ilusing"System.Diagnostics"
program-id. Program1 as "testtwitter.Program1".
data division.
working-storage section.
01 service type TweetSharp.TwitterService.
01 tweets type IEnumerable[type TweetSharp.TwitterStatus].
01 tweet type TweetSharp.TwitterStatus.
01 requestToken type TweetSharp.OAuthRequestToken.
01 uri type Uri.
01 verifier string.
01 access1 type TweetSharp.OAuthAccessToken.
procedure division.
*> replace with real values of ConsumerKey and ConsumerSecret from Twitter
set service to new type TweetSharp.TwitterService("ConsumerKey", "ConsumerSecret")
*> Step 1 - Retrieve an OAuth Request Token
set requestToken to service::GetRequestToken
*> Step 2 - Redirect to the OAuth Authorization URL
set uri to service::GetAuthorizationUri(requestToken)
invoke type Process::Start(uri::ToString)
*> Step 3 - Exchange the Request Token for an Access Token
display "Enter Twitter Verifier Number:"
accept verifier *> <-- This is input into your application by your user
set access1 to service::GetAccessToken(requestToken, verifier)
*> Step 4 - User authenticates using the Access Token
invoke service::AuthenticateWith(access1::Token, access1::TokenSecret)
set tweets to service::ListTweetsOnPublicTimeline
perform varying tweet thru tweets
display tweet::User::ScreenName " says " tweet::Text
end-perform
goback.
end program Program1.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.