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.
Pages: 1
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.
Offline
Coscast,
I am interested in your auto twitter posting. So if you would like to post that would be great.
Thanks
Offline
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 )
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)
Offline
Thanks hon! Just installed this! Appreciate it very much. *Mwah!*
Offline
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
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.
Offline
Use http://www.dlvr.it - very simple and easy. :-)
Offline
Any updates to whether or not this is working?
Offline
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
How do you post links to #porn? Right now all my links are being blocked
Offline
automatic twitter posts , is it something like system generated messages. could u explain me the concept.
Offline
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
i see, thank u. now i understand and feel this could be a very useful feature.
Offline
this is one good feature i can say
Offline
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
i've the same problem..
Offline
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
try this https://dlvr.it/ easy fast better
Offline
Offline
Pages: 1