BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-18-2011, 09:12 AM   #1
xmncxzvt
Thumbs Must Hurt
 
Join Date: Mar 2011
Model: 8900
PIN: N/A
Carrier: Torch
Posts: 59
Default Twitter integration with bb

Please Login to Remove!

Hi,

i m using following code to integrate twitter in my bb app. This code verify credentials but doesnt redirect to login page. To do so, i tried using this after verify credentials but still it doesnt open twitter login screen:-
user=m.getUserAccount();
m.follow(user);


package com.frt.util;

import java.io.IOException;

import net.rim.device.api.ui.component.Dialog;

import com.twitterapime.rest.Credential;
import com.twitterapime.rest.TweetER;
import com.twitterapime.rest.UserAccount;
import com.twitterapime.rest.UserAccountManager;
import com.twitterapime.search.LimitExceededException;
import com.twitterapime.search.Tweet;
import com.twitterapime.xauth.Token;


public class TwitterIntegration {

private static UserAccount user;

public static void integrate() {


Token token = new Token(TOKEN_ACCESS, TOKEN_SECRET);

Credential c = new Credential(USER_NAME, CONSUMER_KEY, CONSUMER_SECRET,token);

UserAccountManager m = UserAccountManager.getInstance(c);

try {

if(m.verifyCredential()){
Dialog.alert("You are now logged in");

Tweet t = new Tweet("Hi!!! This is my first tweet via Twitter API ME.");
TweetER ter = TweetER.getInstance(m);
t = ter.post(t);
}
else
Dialog.alert("User name and/or password are invalid!");
} catch (IOException e) {
// TODO Auto-generated catch block
Dialog.alert(e.getMessage());
} catch (LimitExceededException e) {
// TODO Auto-generated catch block
Dialog.alert(e.getMessage());
}
}
}

any one hv any idea how it will open twitter login screen?
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads for: Twitter integration with bb
Thread Thread Starter Forum Replies Last Post
Facebook & twitter intergration(oauth) in BB application bibin.cs Developer Forum 3 09-05-2010 09:45 PM
Problem w/ Twitpic & BB Twitter app... shogunofharlem Social Networking 3 04-15-2010 08:28 AM
After 1 1/2 year of using my BB 8320- still liking it tuanle General 8300 Series Discussion - Curve 0 12-10-2009 04:11 AM
Mobimouse - turns your BB into a Mouse/Keyboard for any Windows PC! Redflea Aftermarket Software 10 03-30-2009 10:41 PM
Recommendation for Web mail integration with BB hdawg General BlackBerry Discussion 11 02-28-2008 10:40 PM


C2102A-4 INTEL VINTAGE 1K SRAM 1024Bit CERAMIC GOLD PINS APPLE 1, DC1976 Mimeo-1 picture

C2102A-4 INTEL VINTAGE 1K SRAM 1024Bit CERAMIC GOLD PINS APPLE 1, DC1976 Mimeo-1

$30.83



Retro 1951 Apple Computer Logo 0.7mm Ballpoint Black Ink Pen Gold Barrel picture

Retro 1951 Apple Computer Logo 0.7mm Ballpoint Black Ink Pen Gold Barrel

$56.41



Lot of 6 Vintage Apple Drawstring Bags For iPhone, Mac, Apple Watch, iPod picture

Lot of 6 Vintage Apple Drawstring Bags For iPhone, Mac, Apple Watch, iPod

$45.00



Vintage Print Block “ Apple Corer Kitchen Tool “ Copper Face Block picture

Vintage Print Block “ Apple Corer Kitchen Tool “ Copper Face Block

$16.00



Vintage Food Cut-Out Display Print: Mama's Apple Pie w/Ice Cream Topper picture

Vintage Food Cut-Out Display Print: Mama's Apple Pie w/Ice Cream Topper

$19.00



COMPUTER TECH Vintage Street Sign Metal Plastic geek repair fix apple pc picture

COMPUTER TECH Vintage Street Sign Metal Plastic geek repair fix apple pc

$28.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.