Twitter integration on drupal 7 website

I am trying to get the twitter module (7.x-5.4) running on my local drupal 7.19 website. Oauth is already installed and the application for Twitter is registered. I use the keys of this Twitter application.

Callback http://localhost/drupal-7.19/twitter/oauth

twitter host http://twitter.com

Twitter API https://api.twitter.com

Twitter search http://search.twitter.com

TinyURL http://tinyurl.com

when I want to add at least my own Twitter account so that the site can display my tweets. when I want to add this account, an error occurs:

Note: Undefined property: stdClass :: $ data on Twitter-> request () (line 131 from root \ modules \ twitter \ twitter.lib.php). Failed to get valid token from Twitter API. Check the configuration.

any ideas? thanks in advance.

+4
source share
4 answers

In my case, uncommenting the string extension = php_openssl.dll in php.ini resolved the error.

+1
source

I'm not sure if this will work for you, but it worked for me. I had the same exact error, although I followed the documentation. Here's the test: go to admin / reports / status. If you see the following warning: "HTTP request status is not working", this means that your drupal / LAMP stack will not be able to use DNS to call back for itself. In my case, I used my computers to access my Drupal instance. Thus, rather, using "localhost" uses your IP address of your computer (you can use ipconfig on MSWin or ifconfig on Mac / Linux) and use it to complete the Twitter account setup process.

Again not

 http://localhost/drupal-7.19/twitter/oauth 

but

 http://10.0.1.9/drupal-7.19/twitter/oauth 

(substituting the IP address of your machine)

0
source

I was getting the same error that I fixed by adding the corresponding proxy data.

Notice: Undefined property: stdClass::$data in Twitter->request() (line 131 of C:\wamp\www\test_twitter\sites\all\modules\twitter\twitter.lib.php

The problem is related to the proxy server settings. I added values ​​for $conf['proxy_server'] and $conf['proxy_port'] in settings.php , and this error $conf['proxy_port'] away.

I also confirmed that if I delete the proxy settings, this error will be reproduced again.

0
source

Install oauth_common and twitter on your Drupal website

Make sure both Oauth and Twitter modules are enabled. I have not used any of the other Twitter modules for this.

Go to twitter module in Drupal

Go to the Settings tab (button) β†’ (tab) (note that the callback http://localhost/yourwebsite/twitter/oauth ie, it should not be 127.0.0.1)

Click the link where your application is registered.

Go to twitter and log in to be a developer

Add a new app by creating a great feed name

Enter your website details For localhost use: http://127.0.0.1:8000/twitter/oauth for both website and callback URLs Click "Save" when you are done

Then go to the Test OAuth button - this will give you your illusory consumer key and secret key for consumers

Return to the Drupal website and twitter module to configure (button) β†’ settings (tab)

Copy and paste the consumer and consumer secret keys you just received

Click Save Configuration

I hope there will be no errors.

Go to the Twitter tab in the module and hopefully your twitter avatar has appeared

Read the top of the page where it says: β€œTweets are pulled from Twitter by running cron. You can view the full list of tweets in the Tweets view.

Check the "View Tweets" box and click "View." Most likely, your tweets will not appear in the next window - until

Go to the Drupal configuration screen and to [System] Cron and click "Run cron"

Now go back to viewing the tweets from the twitter module and they should all appear

[It was a pig to understand]

0
source

All Articles