WordPress.org

Ready to get started?Download WordPress

Forums

Revive Old Post (Former Tweet Old Post)
[resolved] [Plugin: Tweet Old Post] The oAuth issue (4 posts)

  1. tranchesdunet
    Member
    Posted 2 years ago #

    Hi,

    First, thank you for your plugin, as it works very well.
    But, as a plugin'developer too, I might have found an issue in your oAuth process. Let me explain:
    I'm writing a plugin which is using the Twitter oAuth too. But, each time I try to authenticate with Twitter, the callback is redirected to another url, which not exists. It is due to a javascript function which does a redirection :
    <script language="javascript">window.open ("'.$top_url.'","_self")</script>
    I try to figure out why a function in your plugin intercept a callback from mine. I think, it's because you have written this in your code:
    add_action('admin_init','top_authorize',1);
    which call top_authorize function on admin initialisation, even for other plugins.
    This function will check for oauth_token in the request part of the url and change the url for another which contain "page=TweetOldPost". And of course, all callbacks from Twitter oAuth have a "oauth_token" parameter...
    By deactivating your plugin, I was able to authenticate on my own plugin. And each time I reactivate your plugin, it does the same thing.
    So could you try to use an other way to manage your anthentication so it won't interfere with other plugins using oauth?
    Thanks, and let me know if I can help.

    Best.

    Tranchesdunet

    PS: my oauth plugin is not available yet on wordpress.org as it is in internal beta testing phase.

    http://wordpress.org/extend/plugins/tweet-old-post/

  2. Ajay Matharu
    Member
    Posted 2 years ago #

    Hey thanks for the comment and explaining the issue. I had to use the admin_init as it was causing conflict with google analytics plugin. They have admin_init in their code, so when ever request came to wordpress from twitter which had oauth_token in it, the page used to redirect to google analytics plugin page. I am currently looking for an alternative for it, although i dint had much time to look into this lately. Do lemme know if you have any alternative solution for this issue, I would definitely incorporate that. Thanks again.

  3. tranchesdunet
    Member
    Posted 2 years ago #

    Hi,

    I think one of the fastest way to fix this issue (and without rewriting too much code) would be to add a test to check if the callback url contain "tweet-old-post.php". What do you think of that ?

  4. Ajay Matharu
    Member
    Posted 2 years ago #

    Yes we can do that i'll update that in next release :) thank you for putting light on that :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic