WordPress.org

Ready to get started?Download WordPress

Forums

Bebop
[resolved] Trouble getting Twitter working (26 posts)

  1. Eric Langley
    Member
    Posted 1 year ago #

    I am trying to get my Twitter feed to show up in my Activity Stream. I receive the following error:

    Twitter has not yet been configured. Please contact the blog admin to make sure Twitter is configured properly.
    http://www.redline.cc/bug/DzZMpaab

    I don't see any documentation on setting it up. I activated Twitter in Admin/Content Providers with RSS Enabled.
    http://www.redline.cc/bug/wnzCkaab

    Do I need to enter a Twitter API Token and Secret? How would that work with multiple users adding various Twitter accounts to their stream?

    TYIA for any help.

    [ Signature moderated. ]

    http://wordpress.org/extend/plugins/bebop/

  2. Dale Mckeown
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Yes, you need to register an application on Twitter and use the token/secret it will provide to you.

    oAuth works by authenticating the application first, and then authenticating the user based on twitter login sessions. This means you can only add one account to the Twitter/Facebook extensions per user. All other extensions can have multiple accounts.

    All documentation is on our Github wiki (https://github.com/lncd/bebop/wiki).

    The 'RSS Enabled' checkbox is for publishing RSS feeds from Bebop - it is not a method of import.

    Dale

  3. Eric Langley
    Member
    Posted 1 year ago #

    @dalmac

    Dale,

    Thank you for the reply. I read the documentation on github prior to posting. It does not mention setting up a Twitter app or how to do so. I'd be happy to add that to the Bebop documentation now that I know how.

    The Twitter app page provides two sets of keys, Consumer Key and Secret and Access Token and Secret.

    In Bebop I entered the Access Token and Secret.

    In the Accounts page receive the error when clicking on Twitter: Failed to validate oauth signature and token
    http://www.redline.cc/bug/tYy7vaab

    I entered them again just to be sure.

    Any thoughts?

    [ Signature moderated. ]

  4. Dale Mckeown
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Eric,

    You need the tokens labelled "Consumer Key" and "Consumer Secret" for twitter.

    Any help on documentation would be welcomed, if not, i will write it when i get round to it.

    Thanks,

    Dale

  5. Eric Langley
    Member
    Posted 1 year ago #

    Dale,

    Glad to help on documentation once I get all of the parameters correct. I think that Bebop is a very necessary tool for creating a vibrant learning communities. Thank you for creating it.

    For this Twitter issue I entered the Consumer Key and Consumer Secret into Content Providers Twitter Import Settings page.

    On the Resources/Accounts/Twitter Setup pages I receive the following error: /oauth/request_token?oauth_callback= (balance is a long string)
    http://www.redline.cc/bug/QPzwHaab

    [ Signature moderated. ]

  6. Eric Langley
    Member
    Posted 1 year ago #

    As a follow through I did click the Start Authorization button but nothing happens. When I hover over the button it displays: http://
    " Start Authorisation"

    but it does not appear to append the display string. Should the auth string be exposed on the member page like this in clear text?

    [ Signature moderated. ]

  7. Dale Mckeown
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Eric,

    That's odd.

    Possible because you previously entered an incorrect token/secret. I would advise clearing the 'bp_bebop_user_meta' through your webhost database admin panel and then try again.

    I will have a look at how i can prevent this in the future.

    Dale

  8. Eric Langley
    Member
    Posted 1 year ago #

    I can check that but I think the data is correct in the database. It shows correctly when I view the Content.

    I disabled and re-enabled the plugin.The settings show up correctly.

    I tested the Resources/Accounts/Twitter setup again and got this error this when clicking the Start Authorisation button.
    http://www.redline.cc/bug/Py6d4aab

    It appears that the string is not being passed to the script.

    [ Signature moderated. ]

  9. Dale Mckeown
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Eric,

    Disabling and re-enabling the plugin does nothing.

    Twitter is a pain because it requires an automatic temporary oauth token/secret to be made. If this was made with an incorrect consumer token/secret, you will get the problems you are experiencing.

    Hence, you need to clear the temporary oauth token/secret from the table i mentioned above.

    Dale

  10. Eric Langley
    Member
    Posted 1 year ago #

    Dale,

    I do not see a table named, 'bp_bebop_user_meta'
    I am self hosted and looking in phpMyAdmin...

    [ Signature moderated. ]

  11. Eric Langley
    Member
    Posted 1 year ago #

    Dale,

    I found it. Mine is wp_bp_bebop...

    There is no data in meta_value for either bebop_twitter_oauth_token_temp or bebop_twitter_oauth_token_secret_temp

    From what I can see the auth string is not being appended to the url properly for some reason. Only the base string is being submitted to twitter: api.twitter.com/oauth/authorize?oauth_token=

    This is what I see on the member screen: http://www.redline.cc/bug/g1cNGaab

    [ Signature moderated. ]

  12. Dale Mckeown
    Member
    Plugin Author

    Posted 1 year ago #

    Odd. I suggest you uninstall bebop completely and then reinstall.

    Dale

  13. Eric Langley
    Member
    Posted 1 year ago #

    Dale,

    I removed the plugin and dropped the associated tables. Then re-installed.

    Same result. The full string is not being passed to twitter.

    Is the Resource/Accounts/Twitter screen supposed to show this long string to the user? http://www.redline.cc/bug/g1cNGaab

    [ Signature moderated. ]

  14. Dale Mckeown
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Eric,

    Thanks for trying that.

    No, the long string is not supposed to show, this means an exception was encountered when generating the temporary access tokens. I initially thought this was due to the incorrect keys being saved to the database, but with a fresh install and correct consumer key/token i would not suggest there is something not set right in your twitter application.

    Please check that the app's access level is set to read/write, and the callback URL points to your domain.

    Dale

  15. Eric Langley
    Member
    Posted 1 year ago #

    Dale,

    The Twitter app was set to read only. I changed it to Read and Write but we won't be writing to Twitter anyway, correct?

    Also, the callback URL. What should that be? I try to enter just the domain name it does not save it.

    Under Callback URL The Twitter site says:
    "OAuth 1.0a applications should explicitly specify their oauth_callback URL on the request token step, regardless of the value given here. To restrict your application from using callbacks, leave this field blank."

    [ Signature moderated. ]

  16. Eric Langley
    Member
    Posted 1 year ago #

    Ah, wait. I was able to get it to Authorize! I can see my Tweets!

    However, Bebop does not work with Twitter the way I thought it would. I expected users to be able to enter their Twitter handle and have their tweets come into their or the sites Activity Stream.

    Is that possible? Right now it seems that only one user will work at time?

    [ Signature moderated. ]

  17. Dale Mckeown
    Member
    Plugin Author

    Posted 1 year ago #

    Eric,

    "However, Bebop does not work with Twitter the way I thought it would. I expected users to be able to enter their Twitter handle and have their tweets come into their or the sites Activity Stream."

    That is exactly how it works. Each user has to authorise with twitter, like you just did, to get their contents on their buddypress activity stream.

    Also, don't forget that users will need to verify their tweets in the content manager if you have "should users verify imported content" = yes in the admin backend.

    You can change this No, and it will pick up tweets whenever the cron is ran, no verification required.

    Dale

  18. Dale Mckeown
    Member
    Plugin Author

    Posted 1 year ago #

    Eric,

    apologies, didn't see your first response.

    Correct, we are not going to write to twitter, but the app needs full access to the twitter API's.

    Callback url can be left blank, but for security purposes, i suggest you change it to your domain name (don't forget the http://).

    Dale

  19. Eric Langley
    Member
    Posted 1 year ago #

    Dale, you wrote:

    Okay, I see, each user enters their Twitter credentials on the Twitter site, not the WP/BP site...

    I'll write up some documentation for the github site.

    Thanks!

    [ Signature moderated. ]

  20. Dale Mckeown
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Eric,

    Correct, we do not want to handle any passwords, so pass it off to Twitter to deal with. Once the user has accepted on twitter, we can start importing their tweets :)

    Documentation wise that would be ace.

    Thank you,

    Dale

  21. ninjini
    Member
    Posted 1 year ago #

    I'm getting the same problem "Failed to validate oauth signature and token". I've followed all the above. I also didn't have my Twitter app access set to read/write and I didn't have a callback parameter. I've now changed this but I'm still getting the same error. Any ideas? I haven't been able to find any documentation regarding the APIs needed for Beebop

  22. Dale Mckeown
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Scoobydoobydoo,

    The setup documentation for each extension is something I have been meaning to do but haven;t got round to doing yet.

    If you are getting the "Failed to validate oauth signature and token" message and you are absolutely sure the read/write access and callback parameters are now correct, you have a couple of options. Essentially there is 'bad' access tokens that are now saved in the database which need to be removed.

    1. - check the 'wp_bp_bebop_user_meta' table for your twitter oauth tokens & secrets. Delete them and try again. they will look like so (from memory):

    bebop_twitter_<your-username>_oauth_token
    bebop_twitter_<your-username>_oauth_secret
    bebop_twitter_<your-username>_oauth_token_temp
    bebop_twitter_<your-username>_oauth_secret_temp

    2. - You could also sort the 'wp_bp_bebop_user_meta' by extension and then delete any data relating to twitter.

    3. - deactivate and uninstall bebop, then reinstall and reactivate. This will delete and then recreate the database tables. It will however remove all other data too.

    Let me know how you get on.

    Dale

  23. ninjini
    Member
    Posted 1 year ago #

    Hi Dale

    Thanks for your help. I had already cleared those tables but I tried it again and still no change. Still getting "Failed to validate oauth signature and token". I deactivated Bebop and deleted it, logged out, cleared cache, logged back in again and reinstalled and re-set the parameters. Still getting "Failed to validate oauth signature and token"

    I have a feeling the Twitter API settings are not correct because so far it's been more guess work than anything. It's worth noting that underneath the "Failed to validate oauth signature and token" is a button called "start authorisation". When I click this I get sent to https://api.twitter.com/oauth/authorize?oauth_token= and I see an error "There is no request token for this page". This indicates the Twitter parameters that I've set in WP are not being picked up.

    It's also interesting to note that in the table bp_bebop_user_meta the rows bebop_twitter_oauth_token_temp and bebop_twitter_oauth_token_secret_temp have no values i.e. the meta_value is empty for both. The corresponding values in the bp_bebop_options table DO have values, it's just the TEMP parameters that are empty. Surely that's not right?

  24. Dale Mckeown
    Member
    Plugin Author

    Posted 1 year ago #

    Hi scoobydoobydoo,

    The wp_bp_bebop_options table stores data such as what is found in option settings. The twitter API key and API secret are stores in that table.

    The wp_bp_bebop_user_meta table stores any data that is related to users, such as usernames, access tokens, etc.

    If the 'temp' token/secret are not being produced then there must still be issues with your twitter app api key/secret.

    Can you please check your are using the correct keys - as per this image. You need to be using the 'consumer key' and 'consumer secret' that twitter provides.

    Thanks,

    Dale

  25. ninjini
    Member
    Posted 1 year ago #

    Hi Dale

    Thanks that information helped. I was using the access token details because the Bebop field label is "Twitter API Token". It might help if you rename it to "Twitter Consumer Key" instead?

    Do you have a demo or some screenshots of what this looks like when it's all enabled? I don't even know if it's going to do what I want it to do so before I move on to trying the Facebook API (which looks a bit of a nightmare), it would be great to see what the end result looks like first :-)

    Thanks!

  26. Dale Mckeown
    Member
    Plugin Author

    Posted 1 year ago #

    Hi scoobydoobydoo,

    If I did that it wouldn't be consistent over all extensions. Its a pain that they all give the same thing a different name! What I really need to do is sort out the setup guides. Its just time i am struggling with, working 70 hour weeks currently.

    There are some demo screenshots over in out github documentation.
    The user documentation shows you what this does. For Twitter, it basically just grabs the tweet history, and adds each tweet to the BuddyPress activity feed.

    The Facebook apps are probably on the same level of complexity as the twitter apps. Nevertheless don;t be afraid - I am here if you need me!

    Dale

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags