Quote:
Originally Posted by rjerina
I tried searching but didn't find anything, but instead of storing password or prompting for a password, how do sites like Twitpic etc authenticate? They somehow pick up your authentication to twitter and they just work, I assume with something through the API.
Forgive me if this was posted already. I am interested in this but don't want to store any passwords unencrypted if possible and very little use integration.
|
Well, this doesn't prompt for a password. And twit pic, does. If you go to their site, they prompt for a username / password.
Quote:
Originally Posted by johnbmtl
When I click on the link in th euser options "Setup integration by clicking here."
I get the following from the twitter site:
Woah there!
This page is no longer valid. It looks like someone already used the token information you provided. Please return to the site that sent you to this page and try again ? it was probably an honest mistake.
Did I miss something in the installation?
------------------
Update: Yes I did miss something in the installation.
The instructions to register an OAuth Application which appear under the Upgrading instructions also apply to new installations.
Everything works fine now.
|
Guess I missed something their. *wonders why I screwed that up*.
Quote:
Originally Posted by ClipBucket
To post the title for threads to Twitter, edit tweet.php
Find the section that starts with:
PHP Code:
if($_GET['do'] == 'thread')
{
Find:
PHP Code:
$twitter->OAuthRequest('https://twitter.com/statuses/update.xml', array('status' => $vbphrase['twitter_checkout'] . $vbulletin->options['bburl'] . '/tt.php?i=' . $vbulletin->GPC['id']), 'POST');
Change to:
PHP Code:
$thread = $db->query_first("SELECT title FROM " . TABLE_PREFIX . "thread WHERE threadid = " . $vbulletin->GPC['id']);
$twitter->OAuthRequest('https://twitter.com/statuses/update.xml', array('status' => $thread['title'] .' - '. $vbulletin->options['bburl'] . '/tt.php?i=' . $vbulletin->GPC['id']), 'POST');
This only works when Twittering a thread.
I have not looked into sending post titles yet, though it should also be trivial.
|
Quote:
Originally Posted by ClipBucket
This is not tested.
To post the title for posts to Twitter, edit tweet.php
Find the section that starts with:
PHP Code:
if($_GET['do'] == 'post')
{
Find:
PHP Code:
$twitter->OAuthRequest('https://twitter.com/statuses/update.xml', array('status' => $thread['title'] .' - '. $vbulletin->options['bburl'] . '/tp.php?i=' . $vbulletin->GPC['id'] . '&c=' . $vbulletin->GPC['c']), 'POST');
Change to:
PHP Code:
$post = $db->query_first("SELECT title FROM " . TABLE_PREFIX . "post WHERE postid = " . $vbulletin->GPC['id']);
$twitter->OAuthRequest('https://twitter.com/statuses/update.xml', array('status' => $post['title'] .' - '. $vbulletin->options['bburl'] . '/tp.php?i=' . $vbulletin->GPC['id'] . '&c=' . $vbulletin->GPC['c']), 'POST');
|
I thank you for writing this, but it has the problems within itself. It doesn't do character checking. Which is what I have done extensively for the next version.