I am working on Blackberry Twitter integration to tweet a message on Twitter.
The application works fine in the simulator, but gives an exception when I run it on the device.
Here is the exception that I get every time I launch the application on the device {
OAuth_IO_Exception
I did some research and saw a decision to set the correct time on the device, but it still does not work.
Here is my code:
import com.kc.twitter.activity.TweetToFriend; import com.twitterapime.rest.Credential; import com.twitterapime.xauth.Token; import com.twitterapime.xauth.ui.OAuthDialogListener; import com.twitterapime.xauth.ui.OAuthDialogWrapper; import net.rim.device.api.browser.field2.BrowserField; import net.rim.device.api.ui.UiApplication; import net.rim.device.api.ui.component.Dialog; import net.rim.device.api.ui.component.LabelField; import net.rim.device.api.ui.container.MainScreen; public class TwitterScreen extends MainScreen { private final String CONSUMER_KEY = "{redected}"; private final String CONSUMER_SECRET = "{redected}"; private final String CALLBACK_URL = "http://kingdomconnectng.net/redirect.php"; private LabelField _labelStutus; public static OAuthDialogWrapper pageWrapper = null; private ShowAuthBrowser showAuthBrowserScreen; private String adminMessage; public String adminMessages[]; boolean done=false; Credential c ; TweetToFriend tw; public static StoreToken _tokenValue; public static boolean isTweetPosted=false; public static boolean isTweeterScreen =false ; public TwitterScreen(final String adminMessage) { this.adminMessage=adminMessage; isTweeterScreen = true ; showAuthBrowserScreen = new ShowAuthBrowser(); _tokenValue = StoreToken.fetch(); showAuthBrowserScreen.doAuth(null); UiApplication.getUiApplication().pushScreen(showAuthBrowserScreen); } class ShowAuthBrowser extends MainScreen implements OAuthDialogListener { BrowserField b = new BrowserField(); public ShowAuthBrowser() {
source share