w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
ACAccountStore - trying to follow on Twitter - 410 error
Well, I got rid of the 410 error by using the 1.1 API: SLRequest *postRequest = [SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodPOST URL:[NSURL URLWithString:@"https://api.twitter.com/1.1/friendships/create.json"] parameters:tempDict]; Now I get a 400 error: HTTP response status: 400 Error 0error (null) Which suggested invalid authentication, even though the code above looks exactly like the code I see on every tutorial/example I find. I guess I'll create another question...

Categories : IOS

Getting Trends from Twitter using Oauth with application credentials, no specific twitter user
Finally came upon what I was looking for, the "Application Only" access is done in quite a different way, I just wasn't searching for the right terms to get what I was looking for, here's the page describing all the steps necessary to get a "Bearer" token which can be used to poll Twitter without any traditional user credentials... https://dev.twitter.com/docs/auth/application-only-auth Hope that helps someone else find it faster.

Categories : PHP

Twitter Api throwing 401 - Unable to Authenticate with valid credentials (Linq-to-Twitter)
This turned out to be a bug where Account/VerifyCredentials wasn't handling parameters properly. I fixed it and the updates are now available via the downloadable Source Code.

Categories : Twitter

Twitter::Error::Forbidden - Unable to verify your credentials
You also need to add oauth token and secret If you don't, you just give two credentials of an account. It can't find the correct app used for these credentials. Twitter.configure do |config| config.consumer_key = YOUR_CONSUMER_KEY config.consumer_secret = YOUR_CONSUMER_SECRET config.oauth_token = YOUR_OAUTH_TOKEN config.oauth_token_secret = YOUR_OAUTH_TOKEN_SECRET end

Categories : Ruby On Rails

retrieving facebook token expiry from ACAccountStore/ACAccount?
Why would you want to know when it's going to expire? When you get a token, in Facebook's case, it's token lifetime is extended. I think today this is for an extra 60 days. So when you get it from the accounts store, it should be good to go. The only detail you should be concerned about it if the user is using your app, and then decides to revoke permissions from the Facebook settings itself. In this case you need to make sure you're monitoring the ACAccountStoreDidChangeNotification notification and call renewCredentialsForAccount:completion: appropriately to ask for permissions again, see Documentation. For example: - (void)accountChanged:(NSNotification *)note { [self.accountStore renewCredentialsForAccount:(ACAccount *)self.facebookAccount completion:^(ACAccountCredentialRe

Categories : IOS

Retrieve Credentials from Windows Credentials Store using C#
There is a Nuget library that I've been using called CredentialManagement http://nuget.org/packages/CredentialManagement/ The usage is pretty simple. I wrapped it a little but probably didn't need to: public UserPass GetCredentials() { var cm = new Credential {Target = CredentialName}; if (!cm.Exists()) return null; cm.Load(); var up = new UserPass(cm); return up; } public bool SetCredentials(UserPass up) { var cm = new Credential {Target = CredentialName, PersistanceType = PersistanceType.Enterprise, Username = up.UserName, Password = up.Password}; return cm.Save(); } public void RemoveCredentials() { var cm = new Credential { Target = CredentialName }; cm.Delete();

Categories : C#

How would I tie a user auth'ed by 3rd party provider via ACAccountStore to a backend user obj in the cloud?
What you're asking involves many levels of a system "stack" that are custom to a particular environment. What is "correct" vs "incorrect" is dependent upon the environment you've set up and are connecting to from your iOS app. So from what it sounds like you're leveraging iOS's Twitter functionality to create a Single Sign On (SSO) experience. There are several guides on Twitter's site for doing what you want to accomplish: Integrating with Twitter on iOS: Single Sign On Using Reverse Auth to Get OAuth Tokens on iOS - you can then store these server-side Migrating tokens to system accounts - how you get OAuth tokens from your webapp to iOS.

Categories : IOS

Twitter request to get the latest tweets for a hashtag using Twitter API V1.1 using OAuth settings
You have multiple questions here, so I'll answer them one by one. The search/tweets method You can search tweets using this method in the 1.1 API. According to those docs, you can pass a q parameter which is "a UTF-8 encoded query of 1000 characters maximum". The query for your specific requirements Scroll down on this page and you'll see that you can search for a specific hashtag using #hashtag. Yes, that's it. How can I make V1.1 requests using OAuth? Follow the detailed step-by-step post here, using this library to make authenticated requests.

Categories : Twitter

How to get twitter search results as json with simple browser entry since Twitter v1.1?
First you have to register your app here and get the consumer key and consumer secret. Then you will need to authenticate your request (see the documentation).

Categories : Jquery

Getting Twitter Home timeline throw Error in windows Phone App Using twitter Api v1.1
Twitter API 1.1 doesn't allow you to make unauthenticated web service calls. You need to authenticate with OAuth or App only authentication. Details: https://dev.twitter.com/docs/api/1.1/overview#Authentication_required_on_all_endpoints

Categories : C#

Ruby Gem Twitter - certificate verify failed (Twitter::Error::ClientError)
I'm very new to ruby as well but are you using a Mac? It may be because of outdated SSL certificate files. Here's a link to instructions that solved the problem for me. http://railsapps.github.io/openssl-certificate-verify-failed.html

Categories : Ruby

Django: ImportError allauth.twitter: No module named twitter
I think the correct path should be: allauth.socialaccount.providers.twitter taking a fast look over the code in github This is the path you need to pass to INSTALLED_APPS in case you need it INSTALLED_APPS = ( ..., 'allauth.socialaccount.providers.twitter', ... ) Or in your import like this: import allauth.socialaccount.providers.twitter Hope this helps!

Categories : Django

Twitter gem authentication error (using omniauth-twitter token/secret)
I finally identified the problem (after a night of sleep) - a silly configuration issue! The Twitter gem picked up consumer key/secret pair from the twitter.rb initializer file while omniauth-twitter got it's pair through the environment (sorry, did not show this essential information in my question because that part 'worked'). I mixed up Twitter accounts and utilised two different Twitter applications on the consumer key part. Twitter and omniauth-twitter gems were on different applications. This approach doesn't (and shouldn't) work and causes authentication failure. I should have kept the consumer details DRY of course :)

Categories : Ruby On Rails

using LINQ to Twitter to read public tweets, do i need to register my app at Twitter
Twitter recently shut down API v1.0 and everything now runs on API v1.1, including LINQ to Twitter. API v1.1 requires authentication on all endpoints. So, you will have to create an application and use OAuth. There are demos with the LINQ to Twitter Downloads and with the downloadable Source code. There is a Samples page for various technologies. You can also read the Documentation, which includes explanations of all APIs. I recently added a Twitter API Map so you can match Twitter API endpoints with LINQ to Twitter queries.

Categories : Twitter

Sign in with Twitter button functionality is not working in Twitter api version 1.1
Twitter Anywhere was discontinued in March and is effectively removed since the shutdown of API version 1.0. To allow signing in with Twitter now, follow this manual: Implementing Sign in with Twitter.

Categories : Twitter

Finding the PIN from Twitter.Com after using twitteR library on R and ROAuth package
To avoid to be redirected to the placeholder website and see your PIN. You should : go back to your twitter app https://apps.twitter.com/app/ in the settings, erase the placeholder website address you gave save Next time you will use http://api.twitter.com/oauth/authorize?oauth_token=xxxx and click on "authorize", you will see the PIN.

Categories : R

Twitter+oAuth engine returning 401 when trying to POST to twitter API 1.1
I assume you use SA_OAuthTwitterEngine. Try replacing the method _sendRequestWithMethod... with the following implementation: - (NSString *)_sendRequestWithMethod:(NSString *)method path:(NSString *)path queryParameters:(NSDictionary *)params body:(NSString *)body requestType:(MGTwitterRequestType)requestType responseType:(MGTwitterResponseType)responseType { BOOL isPOST = (method && [method isEqualToString:@"POST"]); NSString *fullPath = path; if (params) { fullPath = [self _queryStringWithBase:fullPath parameters:(isPOST ? nil : params) prefixed:YES]; } // -------------------------------------------------------

Categories : IOS

Pull Twitter Profile Image in Twitter API VERSION 1.1
You can use as below, I am using Tweet Sharp: While callback twitter is providing ProfileImageURL. Maintain this and again hit the provided url using OAuth, it will return Twitter user image URL OR using below URL, hit with OAuth and get ImageURL. https://api.twitter.com/1.1/users/show.json?screen_name=amit For non secure, it will return in ProfileImageUrl and for secure ProfileImageUrlHttps

Categories : Javascript

query pertaining to scribe (for twitter auth) and twitter api v1.1
Simply changing the URL from 1 to 1.1 worked so far for me. Any other suggestions/info/caveats would me quite welcome. OAuthRequest request = new OAuthRequest(Verb.GET, "https://api.twitter.com/1.1/account/verify_credentials.json");

Categories : Misc

Building Twitter profile image url with Twitter user id
You can get it using the users/show method of the Twitter API -- it does exactly what you described. You give it a the ID or the screen name, and it returns a bunch of data, including profile_image_url.

Categories : Twitter

How to parse a Twitter object from Abraham's twitter class in php?
Looking at Abraham's Twitter class get function's source code, it returns a json_decoded array of PHP objects, as the one you showed us. You could simply do: $statuses = $connection->get('whatever arguments your using'); if (!empty($statuses)) { foreach ($statuses as $status) { echo "{$status->text} ", "sent from {$status->source} at {$status->created_at} "; } } For your object the output would be something like: RT @433NL: Als Tahiti vanavond scoort tegen Nigeria volgen we iedereen terug die deze tweet retweet! #confed #433NL sent from Twitter for iPhone at Mon Jun 17 16:17:52 +0000 2013 There are some alternative solutions, but this is already simple enough, so I wouldn't bother reinventing the wheel.

Categories : PHP

Twitter (python-twitter) package is failing
First, are you connected to the internet? From the terminal you can try: ping www.google.com Second, are you replacing the 'consumer_key' with the actual value, i.e. '1234ABCD'? api = twitter.Api(consumer_key='ABCD1234', consumer_secret='1234ABCD', access_token_key='DCBA4321', access_token_secret='4321DCBA') Also note that the value you pass has to be a string, so with quotes around it. And also that for multiple lines in python you have a backslash after each incomplete line: api = twitter.Api(consumer_key='ABCD1234', consumer_secret='1234ABCD', access_token_key='DCBA4321', access_token_secret='4321DCBA')

Categories : Python

How to get user details using twitter api v1.1 (Twitter error 215)
First, you need to Authenticate your request (Get permission). second, see follow these steps: 1.Download FHSTwitterEngine Twitter Library. 2.Add the folder FHSTwitterEngine" to your project and #import "FHSTwitterEngine.h". 3.add SystemConfiguration.framework to your project. Usage : 1.in the [ViewDidLoad] add the following code. UIButton *logIn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; logIn.frame = CGRectMake(100, 100, 100, 100); [logIn setTitle:@"Login" forState:UIControlStateNormal]; [logIn addTarget:self action:@selector(showLoginWindow:) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:logIn]; [[FHSTwitterEngine sharedEngine]permanentlySetConsumerKey:@"<consumer_key>" andSecret:@"<consumer_secret>"]; [[FHSTwit

Categories : Iphone

Twitter 401 not authorized PHP & Abraham Williams Twitter
I fixed it using another great library from J7mbo https://github.com/J7mbo/twitter-api-php/blob/master/README.md Simplest PHP example for retrieving user_timeline with Twitter API version 1.1 I used this code to post to Twitter. /** URL for REST request, see: https://dev.twitter.com/docs/api/1.1/ **/ $url = 'https://api.twitter.com/1.1/statuses/update.json'; $requestMethod = 'POST'; $postfields = array( 'status' => 'Test' ); /** Perform the request and echo the response **/ $twitter = new TwitterAPIExchange($settings); echo $twitter->buildOauth($url, $requestMethod) ->setPostfields($postfields) ->performRequest();

Categories : PHP

How to get data by new twitter api 1.1 url ( https://api.twitter.com/1.1/ ) in iPhone sdk?
New twitter API requires login to fetch data from twitter, as they have mentioned in their documentation that authentication is necessary to perform any twitter related functionality. So now to do any functionality either you should login using OAuth or Twitter framework

Categories : Iphone

Display Twitter Follower Count with Twitter API 1.1
You need to authenticate with Twitter using a registered account before you can make requests to the API. In addition to that, change api.twitter.com/1/ to api.twitter.com/1.1/ More information about the authentication can be found in the API documentation

Categories : PHP

Can we share multiple photos on Twitter at once through Twitter API for iOS?
You can share only 1 image at a time.so to share multiple images you have to loop it. i have done something as below to share 3 images switch (indexImage) { case 0: img = imgBar;// image name break; case 1: img = [self captureView:graphView inSize:graphView.frame.size]; break; case 2: img = [self captureView:otherGraphView inSize:otherGraphView.frame.size]; break; default: break; }

Categories : Image

Twitter access token and access secret is returning null exception after changing to twitter api version 1.1 in android?
Finally I have figured my problem. Just need to change these things: https://api.twitter.com/oauth/authenticate?force_login=true from http://api.twitter.com/oauth/authenticate

Categories : Android

Share via facebook/twitter application in android , don't open browser if facebook/twitter is installed on the device
To post something using Facebook than integrate Facebook android sdk Getting Started with the Facebook SDK for Android Use Feed Dialog to post on Facebook. It automatically open fb app if it is installed otherwise open in browser Post to wall public class PhotoViewer extends Activity implements StatusCallback{ Button btnShare; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_photo_viewer); btnShare = (Button) findViewById(R.id.btnShare); btnShare.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { Session.openActiveSession(PhotoViewer.this, true, PhotoViewer.this); }

Categories : Android

Twitter API 1.1: Getting friends list from twitter
Your call needs to be made with oAuth, a plain URL call won't work, even if the screen name has authorised your Twitter app. You need to construct an HTTP GET to the URL you have shown, but with a properly formed authorisation header (oAuth). It is effectively a web request header with a key of "Authorization" and a generated value which looks like this: OAuth realm="<name of realm, e.g. Twitter API>", oauth_consumer_key="<your app key, you'll know this already from your twitter app>", oauth_nonce="<this is basically a random alphanumeric string which your app should generate>", oauth_timestamp="<number of seconds since 1/1/1970 00:00:00", oauth_signature_method="HMAC-SHA1", oauth_version="1.0", oauth_signature="<this is the trickiest part, you basically have to

Categories : Twitter

Python Twitter: name Twitter is not defined
From your traceback, I can see that your file is named twitter.py: File "/home/XXX/twitter.py", line 11, in <module> Because of this, the line from twitter import * is attempting to import the contents of your own script into itself, rather than the library named twitter, because the current directory generally has precedence over shared libraries. Rename your own script to something that isn't identical to the library you're trying to use (e.g. my_twitter.py), and things will work.

Categories : Python

pulling data from twitter with twitter api
The Oauth you get from the twitter developer site is the key you must use in order to request data from Twitter. You must do server side scripting, like for example PHP in order to use the new Twitter API. Here are tutorials that you can follow if you want to retrieve the twitter feeds via json format. To have an idea how to use the Oauth you got from Twitter Developer site: Authenticating Twitter feed Timeline Parse the json data using jquery: LINK Demo I can guarantee you that the tutorials are working because I have already tried it on my projects. If you have some questions feel free to comment. Thanks

Categories : Twitter

Twitter Integration with Twitter 4j not working
Could be a lot of things: Connection problem; Temporary unreachable servers; Wrong/invalid/expired OAuth token First try again later, then give a look at the settings page of your twitter page. I use these URLs in my app: public static final String REQUEST_URL = "http://api.twitter.com/oauth/request_token"; public static final String ACCESS_URL = "http://api.twitter.com/oauth/access_token"; public static final String AUTHORIZE_URL = "http://api.twitter.com/oauth/authorize"; Try some log and debugging, maybe you can find the error directly from the code.

Categories : Android

Twitter API 1.1 - render twitter's t.co links
With the tutorial you followed you can use these attributes to show actual link. Note: In API v1.1, entities will always be included unless you set include_entities to False or 0. The urls entity An array of URLs extracted from the Tweet text. Each URL entity comes with the following attributes: url: The URL that was extracted display_url: (only for t.co links) Not a URL but a string to display instead of the URL expanded_url: (only for t.co links) The fully resolved URL indices: The character positions the URL was extracted from https://dev.twitter.com/docs/tweet-entities

Categories : Twitter

Get list of twitter friends using twitter API
Well, you just saw the official Twitter documentation that limits you to 15*20 = 300 friends per 15 minutes. I believe what Twitter recommends is for you to store data within your application so that you don't have to reload the entire friends list from their server every time. Ie, store the first 300, and when it allows you store the next 200 in your app permanently. Then you have all 500 followers in a list within your application, and you should in theory never have to update again (or maybe you could have an option for the user to refresh, should his follower list change significantly).

Categories : IOS

crawling twitter using urllib instead of twitter api
You will need to use BeautifulSoup for this process. from BeautifulSoup import BeautifulSoup as soupy from urllib import urllib html = urllib.urlopen(YOUR_TWITTER_URL).read() soup = soupy(html) for tweet in soup.find('ol',attrs={'class':'stream-items'}).findAll('li'): print tweet.find('p').text

Categories : Python

GetMyTimeline in twitter via twitter api and twitter4j
Because the code is clean and clear :) i thought the problem would be a twitter-api settings. And that was it. I've recreate another application and maked sure to enable this: Allow this application to be used to Sign in with Twitter The poor Exception handling and exlanation is the main issue here(TwitterException). it's not well documentated.

Categories : Android

New Twitter API: using it for a custom twitter feed
You can use this code as well to fetch your twitter feeds to any webpage. Please try by putting it to server (because some times i saw problem of not fetching feeds on local machine, but don't worry it would work on server - say with .php file extension) <script> var twitterFetcher=function(){function t(d){return d.replace(/<b[^>]*>(.*?)</b>/gi,function(c,d){return d}).replace(/class=".*?"|data-query-source=".*?"|dir=".*?"|rel=".*?"/gi,"")}function m(d,c){for(var f=[],e=RegExp("(^| )"+c+"( |$)"),g=d.getElementsByTagName("*"),b=0,a=g.length;b<a;b++)e.test(g[b].className)&&f.push(g[b]);return f}var u="",j=20,n=!0,h=[],p=!1,k=!0,l=!0,q=null,r=!0;return{fetch:function(d,c,f,e,g,b,a){void 0===f&&(f=20);void 0===e&&(n=!0);void 0===g&&

Categories : Javascript

Error: Bad value twitter:domain for attribute name on element meta: Keyword twitter:domain is not registered
If you are using HTML5, you may only use values listed in the specification and in the WHATWG wiki page "MetaExtensions" (see also this answer). As twitter:domain is registered in the wiki, it’s valid to use it. So the validator is not up to date.

Categories : Misc

CAS credentials bad
This error indicates that the CAS server is trying to (directly) connect to the client application to deliver a Proxy Granting Ticket (PGT). The url of https://localhost:8443/receptor is what is being tried, and the app is returning a 404-Not Found. If your client application doesn't need to log into other CAS services on the users behalf, then you don't need proxying. Troubleshooting PGTs is more difficult than standard CAS 1.0, CAS 2.0, and SAML 1.1 protocols. If you want to use Proxy tickets, then you might check https://wiki.jasig.org/display/CASC/Using+the+CAS+Client+3.1+with+Spring+Security If you don't need Proxy tickets, then you might check http://static.springsource.org/spring-security/site/docs/3.0.x/reference/cas.html

Categories : Spring



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.