Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2010-10-22 21:45:49

Coscast
Member
From: Germany
Registered: 2010-10-03
Posts: 546

Automatic Twitter Post

Hi,

I managed to integrate an automatic twitter post when a video gets uploaded.
If you are interested in this modification please reply to this message, i will post that here in that topic for free.

A free php class is used for this mod. I do NOT want to make any money from this and i will be happy to share this, if someone replies.


sgt-halfsize-banner.jpg

Offline

#2 2010-11-18 03:00:45

mfeat50
Member
Registered: 2010-10-25
Posts: 114
Website

Re: Automatic Twitter Post

Coscast,

I am interested in your auto twitter posting. So if you would like to post that would be great.

Thanks

Offline

#3 2010-11-18 22:17:52

Coscast
Member
From: Germany
Registered: 2010-10-03
Posts: 546

Re: Automatic Twitter Post

First you need this class:

http://phpfashion.com/twitter-for-php ( No direct link, because thats not nice )

Just download it, unpack it and put Oauth.php and twitter.class.php into your /libraries directory on your webserver where ASP is located.

Second step: Create a Twitter Account and goto http://dev.twitter.com/apps/new.

You have to create an app. That sounds complicated, but is isn't. Just fill out the fields there.

You have to do that, because you need the access tokens, in order to make the auto twitter work.

Third Step:

You have to edit the php file convert.php in /modules/video/scripts/

Find:

$db->query("UPDATE #__video
                        SET ext = '".$db->escape($format)."',
                            duration = ".(float) $video['duration_seconds'].",
                            thumbs = ".$thumbs.",
                            server = ".$server_id.",
                            status = ".$status."
                        WHERE video_id = ".$video_id."
                      LIMIT 1");

and add this after those lines:

                     $db->query("SELECT title FROM #__video
                                WHERE video_id = ".$video_id."                             
                              LIMIT 1");
                  $video         = $db->fetch_assoc();
                  $video_title = $video['title'];
                  $video_url   = 'http://www.yoursite.com/' .$video_id. '/' .prepare_string($video_title, true).'/';
                  require_once $base_dir.'/libraries/twitter.class.php';
                  $twitter = new Twitter(consumerKey, consumerSecret, accessToken, accessTokenSecret);
                  $status = $twitter->send($video_title. ':' .$video_url. ' #porn #xxx #sex');

NOTE: consumerKey, consumerSecret, accessToken, accessTokenSecret are you OWN Keys, you'll see them in the details of the APP you created earlier with twitter.

Replace http://www.yoursite.com/ with your siteurl.

That #porn #xxx #sex are hashtags i use. You may replace them ones you like.
Maybe someone can help to get the first three tags from the video posted, to have more dynamic hashtags. ( Hi Adrian smile )

If there are any questions please ask, questions are NEVER stupid, only answers can be stupid.

If you've got that working, i will tell you how to shorten those urls posted to twitter via is.gd on the fly (if needed). But first get that working what i posted above.

Last edited by Coscast (2010-11-18 22:22:27)


sgt-halfsize-banner.jpg

Offline

#4 2011-10-16 00:04:36

Pornogoddess
Member
From: NY
Registered: 2011-01-12
Posts: 183
Website

Re: Automatic Twitter Post

Thanks hon! Just installed this! Appreciate it very much. *Mwah!*

Offline

#5 2011-10-17 00:29:23

Pornogoddess
Member
From: NY
Registered: 2011-01-12
Posts: 183
Website

Re: Automatic Twitter Post

Followed this and it doesn't seem to work when I'm adding videos through the admin panel or when I "Publish" a video. Does it only work from the front end when a user adds a video? Know anyway to make it auto post when an admin hits "Publish?" :-)

Thanks again Coscast for going through this writeup.

Offline

#6 2011-10-17 08:29:18

Coscast
Member
From: Germany
Registered: 2010-10-03
Posts: 546

Re: Automatic Twitter Post

Hey Kiki,


I recommend to use dlvr.it for automatic twitter posting. I even don't know if this howto fits for RC4, or if twitter changed something. So take i look @ http://www.dlvr.it it's easy to use.


sgt-halfsize-banner.jpg

Offline

#7 2012-04-02 02:57:49

hodmedia
Member
Registered: 2011-10-15
Posts: 159
Website

Re: Automatic Twitter Post

does this still not work

Offline

#8 2012-04-02 12:43:12

Pornogoddess
Member
From: NY
Registered: 2011-01-12
Posts: 183
Website

Re: Automatic Twitter Post

Use http://www.dlvr.it - very simple and easy. :-)

Offline

#9 2012-04-02 22:32:22

hodmedia
Member
Registered: 2011-10-15
Posts: 159
Website

Re: Automatic Twitter Post

lol i cant use dlvr any more thats why i ask

Offline

#10 2012-06-20 20:04:10

Valistix
Member
Registered: 2012-06-16
Posts: 153

Re: Automatic Twitter Post

Any updates to whether or not this is working?

Offline

#11 2012-06-21 08:14:46

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Automatic Twitter Post

There is no reason why this should work. Twitter provides a API for this.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#12 2012-09-15 02:37:29

ptsguy
Member
Registered: 2012-08-06
Posts: 135

Re: Automatic Twitter Post

How do you post links to #porn? Right now all my links are being blocked

Offline

#13 2012-10-08 10:39:45

satty
Member
Registered: 2012-08-23
Posts: 29

Re: Automatic Twitter Post

automatic twitter posts , is it something like system generated messages. could u explain me the concept.

Offline

#14 2012-10-08 12:24:58

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Automatic Twitter Post

It means that every time you upload a video, a post is written on twitter for the upload video (probably title and video url).


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#15 2012-10-16 09:28:15

satty
Member
Registered: 2012-08-23
Posts: 29

Re: Automatic Twitter Post

i see, thank u. now i understand and feel this could be a very useful feature.

Offline

#16 2013-01-28 10:20:32

rbmoss
Member
Registered: 2012-08-17
Posts: 36

Re: Automatic Twitter Post

this is one good feature i can say

Offline

#17 2014-04-10 09:46:56

corr_blimey
Member
Registered: 2012-05-24
Posts: 4
Website

Re: Automatic Twitter Post

is there any update to the convert.php code for ASP version 1.0.9?

i get as far as searching the convert.php for the following...

$db->query("UPDATE #__video
                        SET ext = '".$db->escape($format)."',
                            duration = ".(float) $video['duration_seconds'].",
                            thumbs = ".$thumbs.",
                            server = ".$server_id.",
                            status = ".$status."
                        WHERE video_id = ".$video_id."
                      LIMIT 1");

but the closest i can find is...

$sql	= "UPDATE #__video
			           SET ext = '".$db->escape($ext)."',
			          	   mobile = '".$mobile."',
			               duration = ".(float) $conv->data['duration_seconds'].",
			               thumbs = ".$thumbs.",
			               server = ".$server_id.",
			               s3 = '".$s3."',
			               status = ".$status."
			           WHERE video_id = ".$video_id."
			           LIMIT 1";

i tried adding the extra twitter variables (from the app i created) after the "LIMIT 1";" line, but all this did was to break and stop any video converting from working...

Offline

#18 2014-08-27 18:25:00

donronca
Member
From: The Netherlands
Registered: 2012-12-27
Posts: 317
Website

Re: Automatic Twitter Post

i've the same problem..  sad

Offline

#19 2014-08-27 20:30:46

donronca
Member
From: The Netherlands
Registered: 2012-12-27
Posts: 317
Website

Re: Automatic Twitter Post

the video's uploads good and i can activate it.
only it don't post automatically on Twitter.

do any one of you have the solution?

Greets..

Offline

#20 2014-08-28 05:58:32

Eri
Member
Registered: 2011-03-18
Posts: 977

Re: Automatic Twitter Post

try this https://dlvr.it/ easy fast better


Best Adult Affilitate Network:
ExoClick
Best Deals on Dedicated Servers - CDN
INXY

Offline

#21 2014-09-08 20:08:21

donronca
Member
From: The Netherlands
Registered: 2012-12-27
Posts: 317
Website

Offline

Board footer

Powered by FluxBB