News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[WIP] SA Twitter Integration

Started by SA™, May 09, 2011, 03:24:34 AM

Previous topic - Next topic

SA™

my latest mod

once installed creat an app on twitter
https://dev.twitter.com/apps/new

Application Website: your site url

Callback URL: website url plus ?action=twitter
example
http://siteurl/index.php?action=twitter

fill in the other stuff then once you have done that and got your keys
goto twitter admin and add your keys

feedback good or bad is appretiated

http://custom.simplemachines.org/mods/index.php?mod=3055
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Masterd

This is nice. Keep up the good work. :)

SA™

http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

SA™

#3
package update fixed many errors and added admin panel

live demo
http://www.sa-mods.info/index.php
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

SA™

wow two days and one reply no one interested in this? or am i just being ignored :(
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Dreko


SA™

any body else writes a mod and people are on it like flys around s*** i write a mod and get ignored what gives?

it sure makes me think why the helll do i bother

* SA™ gives up

http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

DoctorMalboro

Excelent mod. I tried to wrote something like this many times, but OAuth beat me... You are a hell of a coder to make this effort and give it for free...

Most people won't thank you because, well, the world is selfish. So, thank you for sharing and I hope to see it out of the wip soon... ;)

Matthew K.

DoctorMalboro is right. Most people don't appreciate what people contribute and take it for granite, which is why I think most modders who write big mods eventually move to paid mods to at least regain something from donating so much time and effort into big projects.

Keep up the good work SA!

SA™

http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

~DS~

"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

SA™

http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Douglas

Didn't go as planned, files are not going into the right directory.  After I manually moved Twitter.php to the correct directory, gave me the white screen of death.

Will have to delete all files and DB (kind of annoyed, but it wasn't a production site) and reload the forums from scratch.

You need to check your coding/installation package.  I really want this integration, as it would allow me to ditch WordPress.  :D
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

~DS~

Fancy seeing you here, Douglas. I'm beta testing this, and don't have this issue. It's still WIP so there might be bugs...
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

SA™

i have tried this on sevaral sites myself and have not had that problem ive even got it on my live site with no problems
ill do more testing later with it
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Douglas

To be fair, I also did a small update from RC4 to RC5 before doing the package installation.  I'm gonna go ahead and blow out the forum install and do a fresh one and then try to do the upgrade again.

I should note that I didn't see the key/secret variables in the {$smf}_settings table, only the enabled one.  (Can you tell just how much I want this working?  HAH!)
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

SA™

there is no default setting for key/secret variables so it wont show in your db untill you add the keys

im using updateSettings() to install default settings but it seems to overwrite the settings each time you reinstall so i took the default settings for the keys out
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Douglas

#17
Okay, same exact errors on a brand new RC5 installation (no other mods installed).

QuoteNotice: Undefined index: tw_app_id in /home/gh/public_html/forums/Sources/Twitter/TwitterHooks.php on line 30

Notice: Undefined index: tw_app_key in /home/gh/public_html/forums/Sources/Twitter/TwitterHooks.php on line 31

Warning: require_once(/home/gh/public_html/forums/twitterauth/lib/Twitter.php) [function.require-once]: failed to open stream: Not a directory in /home/gh/public_html/forums/Sources/Twitter/TwitterHooks.php on line 191

Fatal error: require_once() [function.require]: Failed opening required '/home/gh/public_html/forums/twitterauth/lib/Twitter.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gh/public_html/forums/Sources/Twitter/TwitterHooks.php on line 191

What's interesting is that the installation package created a 0 byte file called "lib" in the "twitterauth" directory.  This means that "Twitter.php" is not going into the right directory (it placed it in the Sources/Twitter folder.

UPDATE:  Got the dreaded white screen again.  When I "breaK" TwitterHooks.php by leaving an unclosed comment, the page loads up (albeit with an error message)

The culprits seem to be on
   $consumer_key = $modSettings['tw_app_id'];
   $consumer_secret = $modSettings['tw_app_key'];

It's important to note that when I have those enabled or commented out completely that I get the WSOD.

Also, I went to your site and was going to sign up via my Twitter account, however, it still asked me for a username, email, etc etc.  This needs to be seamless for people.  :)

(Again, if you can get this working properly, severa people would be extremely grateful, including myself. If it works EXACTLY as intended, I may implement this on Hogville.)
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

SA™

#18
QuoteAlso, I went to your site and was going to sign up via my Twitter account, however, it still asked me for a username, email, etc etc.  This needs to be seamless for people.

you can not get the users email with twitter api
password is for secrity
and name well explains it self :P

anyway you only need to do this once any logins after that are seamless

QuoteUPDATE:  Got the dreaded white screen again.  When I "breaK" TwitterHooks.php by leaving an unclosed comment, the page loads up (albeit with an error message)

can you try it now i just updated the package?
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Douglas

#19
Okay, the WSOD error was a PEBCAK error on my part.

One thing that needs to be fixed in your integration is that every time I log in via my Twitter account, it asks me to authorize the app. It should only take me to that screen once, on registration.

Getting there. :)
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

~DS~

Quote from: Douglas on May 20, 2011, 09:35:49 PM
One thing that needs to be fixed in your integration is that every time I log in via my Twitter account, it asks me to authorize the app. It should only take me to that screen once, on registration.
Not sure about this, this could be the limit or how twitter does in their API for authentication. Added to the tracker.
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

SA™

fixed seem i was always sending user to

http://twitter.com/oauth/authorize
all the time instead of just once

had to modify the api to make it work as it should
to go to
http://twitter.com/oauth/authenticate


Quote from: Douglas on May 20, 2011, 09:35:49 PM
Okay, the WSOD error was a PEBCAK error on my part.

One thing that needs to be fixed in your integration is that every time I log in via my Twitter account, it asks me to authorize the app. It should only take me to that screen once, on registration.

Getting there. :)
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

FlipPro

I am adding this to my site TWEETFORUM.COM [nofollow] . I am looking for even better twitter integration, I want hashtags and @mentions to automatically link back to twitter, i want to be able to use @in the forums and have it plugin to either the users profile/ or twitter. The user should be able to self define the option they want when someone mentions their name. And I also want people to have the ability to tweet out/in from inside their profile, (i already have it set to tweet out each topic) SA I have worked with you in the past for MoneyMakerForums, and I am willing to beta test/ and work with you HARD. Lets get to work.

~DS~

The @Anywhere feature is being worked on.
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

FlipPro

By who? I also want to have a rewriter engine, that automatically rewrites popular phrases and hastags, and @s. I was going to use the censor feature to do this but it is going to have problems if i try to add a link back twitter when converting the words.

edit: didn't realize you were working with him V. I guess you meant you and him are working on it. Thank you sir, I am going to be installing your mod today, and start playing with it. I know I am going to have to learn alot more about the twitter API in order to make this forum into the one that it has potential to be.

~DS~

"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

FlipPro


SA™

this is for smf2 only

package updated

fixed Undefined index: tw_app_api
fixed twitter messing up boardindex
fixed missing text strings
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Douglas

Quote from: SA™package updated
fixed Undefined index: tw_app_api
fixed twitter messing up boardindex
fixed missing text strings
Glad I didn't install .3 then, haha!  I'll test it out today. :)
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

Douglas

Looks like it's working, as intended.  Nice work, guys (and thanks!)
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

SA™

ok secrity update package updated

id advise to any using to update your copy asap

big thanks to
Bobomaster for spotting this issue
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

SA™

http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

tabletsdroid

this is great SA! just what ive been looking for. after reading Douglas' comment though, I think im going to hold back a while before installing.
Are you Looking Forward To it?

~DS~

Quote from: tabletsdroid on June 17, 2011, 03:58:39 AM
this is great SA! just what ive been looking for. after reading Douglas' comment though, I think im going to hold back a while before installing.
He just said it was working. ???
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

tabletsdroid

Quote from: ~DS~ on June 17, 2011, 09:31:58 AM
Quote from: tabletsdroid on June 17, 2011, 03:58:39 AM
this is great SA! just what ive been looking for. after reading Douglas' comment though, I think im going to hold back a while before installing.
He just said it was working. ???

so he did!
Are you Looking Forward To it?

Apllicmz

#35
Yes thank you
Work Fine
Translate in portugues done




Edit ....Api
How can resolv that error
thank you



twitter

A newbie question. Where can I download this mod from?

~DS~

Quote from: twitter on July 08, 2011, 04:32:08 AM
A newbie question. Where can I download this mod from?
First post of this topic?
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

twitter

Hasnt the package been updated a couple of times since then?

twitter

Guys is this MOD production ready? I really love the mod but I am seeing a significant performance degradation after installing this mod. The minute I uninstall this mod the performance goes back up. Am I doing something wrong?

Here is what I have done:

1. Vanilla Installed SMF 2.0
2. Installed Pretty URL and RSS Feeder MODS.
3. Installed SA Twitter Mod.


AD/vh

Hi,

I LOVE that you've done this, I can't wait to try it out... BUT.  The setup page in the admin section asks for the consumer key, consumer secret, and API key.  There's nothing in the app setup area on Twitter labeled "API Key", and the dev forum people are saying that the consumer key IS the api key.  If this is the case, I'm thinking the admin page ought to say so, otherwise it's reeeeeally confusing for those of us who are less than clueful...  and if it's NOT what I'm supposed to enter, where am I going wrong?

nolageek

Any way to get this working in 1.1.*? :)

~DS~

Quote from: nolageek on September 23, 2011, 05:24:12 PM
Any way to get this working in 1.1.*? :)
No, I don't think anyone will backport to 1.1 series. 2.0 is already official out, you might want to upgrade.
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

nolageek

I can't because I need a module that's only available for 1.1.* (Mailing List) - such is the problem with having two supported versions. :)

BPLive

Thanks for the mod SA.

I have fb mod working nicely also.  but twitter seems more confusing... especially for current members.   If a member clicks 'login with twitter'......  ok you sign into twitter but then it brings you to  'Register Twitter'  <<<  what the heck does that suppose to mean?  therefore I and other people fill in something and it registers a whole new name.  because people don't know that they have to click to their profile to sync up twitter.  Therefore it should be explained on that  'Register Twitter'  page to not sign up for an account better with directions for profile sync.    Strange.    FB mod people understand better.

Get what I'm saying? 

PS. I left a FB error log issue at your site forum for days that I'd like at least an answer to  :)  thanks.
www.ChineseDemocracy.com Your Guns N Roses Forum

BPLive

Quote from: BPLive on October 07, 2011, 05:46:58 AM
Thanks for the mod SA.

I have fb mod working nicely also.  but twitter seems more confusing... especially for current members.   If a member clicks 'login with twitter'......  ok you sign into twitter but then it brings you to  'Register Twitter'  <<<  what the heck does that suppose to mean?  therefore I and other people fill in something and it registers a whole new name.  because people don't know that they have to click to their profile to sync up twitter.  Therefore it should be explained on that  'Register Twitter'  page to not sign up for an account better with directions for profile sync.    Strange.    FB mod people understand better.

Get what I'm saying? 

PS. I left a FB error log issue at your site forum for days that I'd like at least an answer to  :)  thanks.

Still 0 support on this here and in SA Forum for weeks now.   I have the same issues with FB and Twitter in Error log show Critical error:

Apply Filter: Only show the error messages of this URL
http://www.mysite.com/index.php/topic,27799.0.html
The database value you're trying to insert does not exist: current_board
Function: get_boards
File: /home/cd/public_html/forum/Sources/Twitter/TwitterHooks.php
Line: 304


using  SMF 2.0.1
Simple Portal 2.3.3

how my forum is in the /forum dir and the above has the URL as http://www.mysite.com/index.php/topic,27799.0.html without forum dir.  Just don't know how to fix this.
www.ChineseDemocracy.com Your Guns N Roses Forum

Ascot

2 questions.
1st where do i get my Api Key?, because it doesn't shows up on my Api details
2nd  is there a code i can use to show a Login button on my current index-template ?

Thanks in advance :)

~DS~

Quote from: Ascot on November 21, 2011, 12:27:36 PM
2 questions.
1st where do i get my Api Key?, because it doesn't shows up on my Api details
2nd  is there a code i can use to show a Login button on my current index-template ?

Thanks in advance :)
1- OAuth settings: Consumer key
2- Like Facebook, there hopefully will be hook.
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

SA™

there is a function to call in next version to show the login button
the api key isnt needed any more you can leave that
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

~DS~

Quote from: SA™ on November 21, 2011, 01:42:52 PM
there is a function to call in next version to show the login button
the api key isnt needed any more you can leave that
They rename API Key to Consumer key, I think.

Yep. https://dev.twitter.com/discussions/615 ;)
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

SA™

aha thanks for that i wonderd where it went cos @anywhere uses api key
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Ascot

but there's a field for Consumer Key and one for Api key.
Besides that, it works Anyways.

So you say, i'll be able to use login button on mod's next version? or did i misunderstand you?

Thanks 4 your answers  :)

SA™

yes cos when i first coded this mod there was an api key but now there isnt consumer key is now the api key aswell besides the api key isnt realy hooked up to anything it was just a start on adding @anywere

QuoteSo you say, i'll be able to use login button on mod's next version? or did i misunderstand you?

correct your be able to call it like so
show_twitter_login(); in the next realse
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Ascot


Nitesh Kunnath

Will this mod work fine with Enotify ? will it conflict ?

SA™

http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-


Advertisement: