twitter-oauth

Go back after call Intent.ACTION_VIEW in android

寵の児 提交于 2019-12-03 16:10:43
My app has 3 activity A, B, C. Activity A calls B. In B, I call Intent.ACTION_VIEW to do authentication with Twitter as below: public static void DoAuthen(Context context, String CallBackUrl) throws OAuthMessageSignerException, OAuthNotAuthorizedException, OAuthExpectationFailedException, OAuthCommunicationException { httpOauthConsumer = new CommonsHttpOAuthConsumer(context.getString(R.string.Twitter_ConsumerKey), context .getString(R.string.Twitter_ConsumerSecret)); httpOauthprovider = new DefaultOAuthProvider("http://twitter.com/oauth/request_token", "http://twitter.com/oauth/access_token",

Why should you base64 encode the Authorization header?

夙愿已清 提交于 2019-12-03 14:00:31
Twitter's API requires sending an Authorization header that is a base64 encoding of an API key concatenated with an API secret key. In Node, I use: var base64 = new Buffer(apiKey + ':' + apiSecret).toString('base64'); The header sent becomes: Authorization: 'Basic ' + base64 What is the point of base64 encoding the string "apiKeyHere:apiSecretHere"? Why not just accept an Authorization header containing the raw api credentials? This question is similar to What is the purpose of base 64 encoding and why it used in HTTP Basic Authentication? but the voted answer doesn't fully answer my question.

Posting images to twitter in Node.js using Oauth

天涯浪子 提交于 2019-12-03 13:20:48
I'm trying to post images to Twitter using the Oauth module. Here is what I have: It throws a 403 error, I know im doing something wrong with how I add the media to the post but Im just not sure where to go from here. var https = require('https'); var OAuth= require('oauth').OAuth; var keys = require('./twitterkeys'); var twitterer = new OAuth( "https://api.twitter.com/oauth/request_token", "https://api.twitter.com/oauth/access_token", keys.consumerKey, keys.consumerSecret, "1.0", null, "HMAC-SHA1" ); var params = { status : "Tiger!", media : [("data:" + mimeType + ";base64,") + fs

Using OAuth for both development and production environments

旧城冷巷雨未停 提交于 2019-12-03 13:17:32
I have seen other questions on SO about this ( here , here , and here ), but I am not satisfied with any of the solutions, so I am asking it again. I am starting a web application that will utilize OAuth from multiple providers (Google, Facebook, Twitter, Yahoo) for authentication. I am struggling to find a configuration suitable to use for both a local development environment and a production environment. The leading solutions I've found are to register multiple apps within each provider, receiving a different consumer key and secret for each: "My App Production" - with a callback URI to http

R TwitteR package authorization error

对着背影说爱祢 提交于 2019-12-03 13:09:52
I am following the latest update on twitteR homepage , and I can't pass the authorization process. library(devtools) install_github("twitteR", username="geoffjentry") library(twitteR) api_key <- "XXXXXXXXXXXXXXXXX" api_secret <- "XXXXXXXXXXXXXXXXX" access_token <- "XXXXXXXXXXXXXXXXX" access_secret <- "XXXXXXXXXXXXXXXXX" setup_twitter_oauth(api_key, api_secret, access_token, access_secret) This is the output I am getting back: [1] "Using direct authentication" Error in check_twitter_oauth() : OAuth authentication error: This most likely means that you have incorrectly called setup_twitter_oauth

Android Twitter login not working with Fabric SDK - Callback must not be null

谁说我不能喝 提交于 2019-12-03 12:55:40
I'm working on a feature that needs to access the public data of Twitter users through the Twitter REST API, and I'm using Twitter's Fabric SDK for logging into Twitter. Here is the code of my Activity : @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.fragment_twitter_settings); } @Override protected void onResume() { super.onResume(); buttonAdd = (Button) findViewById(R.id.add); buttonLogin = (TwitterLoginButton) findViewById(R.id.login);

Asp.Net MVC 5 Owin Twitter Auth throwing 401 Exception

和自甴很熟 提交于 2019-12-03 09:20:32
I have set up OAuth authentication using the Owin middleware based off the default project that gets created when starting a new Web project using "Individual accounts" authentication. I've tweaked it a bit, but Facebook and Google are working great, however, when I click on the "twitter" button to issue the challenge, it's throwing a 500 http exception with the error message: Response status code does not indicate success: 401 (Unauthorized). This only comes up with Twitter. Here is my auth config: // Just a configuration section that reads from the web.config var configuration = new

PHP/Twitter oAuth - Automated Tweets

蓝咒 提交于 2019-12-03 08:07:36
Im using the following code to read to consumer_key and consumer_secret from config.php, pass it to twitter and retrieve some bits of information back from them. What the script below attempts to do is 'cache' the request_token and request_secret. So in theory I should be able to reuse those details (all 4 of them to automatically tweet when required). <?php require_once('twitteroauth/twitteroauth.php'); require_once('config.php'); $consumer_key = CONSUMER_KEY; $consumer_secret = CONSUMER_SECRET; if (isset($_GET["register"])) { // If the "register" parameter is set we create a new TwitterOAuth

how to post tweet using twitter 1.1 api and twitteroauth

我只是一个虾纸丫 提交于 2019-12-03 07:52:51
问题 I use the below code to retrieve my tweets and echo json. This works fine. <?php session_start(); require_once('includes/twitter/twitteroauth.php'); $twitteruser = "xxxxxx"; $notweets = 3; $consumerkey = "xxxxxxx"; $consumersecret = "xxxxxx"; $accesstoken = "xxxxxxxx"; $accesstokensecret = "xxxxxx"; $connection = new TwitterOAuth($consumerkey, $consumersecret, $accesstoken, $accesstokensecret); $tweets = $connection->get("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=".

Login with twitter in ios 7

你说的曾经没有我的故事 提交于 2019-12-03 04:05:55
I am doing login functionality. In which - user will give twitter email id to login and if login gets succeeded, my app will navigate user to its inner screen of my app. If user has configured twitter account from user's device ios settings. My app takes user's email id from there and it will navigate into second screen of my app. If user has not configured twitter account from ios settings then, if user tapps a button login with twitter from my app login screen, it will navigate user to the twitter page from where user has to give email id (twitter id) and password and if login is successful