Skip to Content
It is currently July 15th, 2018, 8:54 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 712 posts ]  Go to page 1, 2, 3, 4, 5 ... 48  Next
Author Message
PostPosted: February 19th, 2010, 6:04 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7572
Location: Aachen (Germany)
I've built a webservice to post songinfo to social networks(currently limited to twitter) automatically from your SAM.
Sign up at sam-song.info for each social network seperately.
You can change the settings to suit your needs and once you click save you can download a custom PAL that is generated according to your preferences.


Development for a new version has started. Facebook will return and a bunch of new things will happen.
Most importantly the service will switch to a premium subscription model in order to cover it's own costs.
More info in my latest post on page 45.



If you can't resist to request support on facebook, please do so on this page: https://www.facebook.com/pages/SAM-Song ... 5310587113
I'll also post updates there and announce features etc.
The page is independent from the app, just to be safe and make sure nothing gets lost again.

The Fineprint:
Stay inside the limits given by Twitter and Facebook TOS, especially with your links and pictures.

You may change the PAL as you like, but I'd be happy if you credited me as the original developer.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Last edited by Mastacheata on April 29th, 2011, 6:09 pm, edited 31 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Changelog
PostPosted: February 23rd, 2010, 3:36 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7572
Location: Aachen (Germany)
The latest changes to the PAL script and webservice are recorded in this post:
Update 2012-09-08:
  • Facebook requires reauthentication every 60 days (starting 2012-09-01)
    Just go to the website and grab an updated PAL
  • Moved Sourcecode to GitHub and added Setup Guide
  • Added Instant Support Module to Website
    (Use that whenever possible, this thread should only be the last resort)

Update 2011-07-27:
  • New Facebook app with slightly modified layout
  • Link or picture mandatory (if neither is set, a link to your profile is shown)
  • Response on successful post is now a link to the post
  • Response on failure is now only telling that an error occured, not which
  • On errors, report the exact timestamp with timezone, error messages are silently logged on the server

Update 2011-07-12 (beta-testing on dev.sam-song.info):
  • Updated backend for faster processing
  • Updated PAL scripts to handle a problem with detecting the Active Deck
  • Options included in webinterface to select different posting intervals

Update 2011-02-16:
  • Source code for PHP backend available
  • Created a Wiki for common problems and user guide
  • Issue tracker for problems

Update 2011-01-10:
  • New Twitter version
  • Prefix, Postfix configuration for twitter
  • Unified landing page for both scripts
  • New Website: http://sam-song.info/

Update 2011-01-06:
  • Settings in Facebook now officially accessible.
  • Action Link works
  • More customization (Prefix, Postfix)
  • Preview your settings live (click Preview when you changed something)
  • Settings page uses your stored preferences as default

Project start 2010-02-20:
  • Post every played Song to Facebook or Twitter (and just that)
  • Horrible performance
  • Could cause SAM to crash
  • PAL script still available in the next Post

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Last edited by Mastacheata on April 29th, 2011, 6:11 pm, edited 3 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Archive
PostPosted: February 26th, 2010, 10:11 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7572
Location: Aachen (Germany)
This post will from now on be used as the archive of old content.
All content herein is just for the record. Especially the PAL script shown here will no longer work!

Mastacheata wrote:
Hello,

I've played around with the facebook API today and would like to test my application in a larger scale.
For now it only changes the users status message to the display the currently playing song.
Planned is to extend this to dedications/requests from the phpweb and eventually posting the album art on facebook too.

Any Ideas for other social networks are welcome. (I've already seen twitter out there and I plan on adding the VZNetzwerke [German facebook copy])

I just registered on facebook and don't know if any of my friends are registered there at all, otherwise I would attack them ;) (I'm living in Germany, here most people don't use facebook)
It should be possible to send messages from SAM to any facebook account if the owner accepts to.

The Service is some kind of hybrid. Since the facebook API is kinda complicated and only accepts input via post it's nearly impossible to realize in PAL.
I'll host a php script that does the real work talking to facebook and registered users can call that script from PAL via WebToString.

I'll publish the PAL Script here when it's tested and approved.
For now you can ask me via PM and use my PHP Service.


Here you can register for the Beta test. (You Approve that my application may post messages to your feed without prior notification, but can revoke that in your profile settings at any time)
Please Login to Facebook first, otherwise this might not work as expected (Your userid is stored in my database. I don't know if it's possible to get a list of authorized users otherwise)

Thank you very much in advance


Mastacheata wrote:
Now I've got 6 or 7 people open the page and 3 of them accepted my application.
I'd like to say thank you to all who even bothered to read this and open my app's page.
I'm sorry to bother you again, but since most people's "walls" are not public I can't manually see if my app did what it was supposed to.
(My application may read your walls, but since that would render all your privacy settings useless I won't write any code that does such a thing)

Would you please be so kind and tell me here, when you see the following message (Or anything that looks similar) on your wall (best with screenshot):
Code:
Thank you for beta testing the Sam Broadcaster Facebook API
   If you've seen this message on your facebook wall, would you please be so kind and report back to me at the Spacialaudio Forums.
   Thank You



EDIT: Status Update: App is now able to post images (PHP Side). If the base adress of your image folder is available on the net and known to the app it will be possible to post the album art to facebook.
PAL Sourcecode will be published after 3 successful reports. (You can use my php service from that point)


This is only here for archival purposes!
Mastacheata wrote:
3 Posts in a row now. Seems like noone's really interested in this app?

The rudimentary Song Info Posting works well enough to present it to the public.
If you like you can test it now using my Server. Configuration is explained in the PAL Script.

Code:
{## Facebook Poster v0.10}

///////////////////////////////////////////////////////////////////
// License Agreement or Nettiquette                              //
// You may use this PAL Script to communicate with my server     //
// Change it to your like but don't flood the server/facebook    //
//                                                               //
// Also make sure you don't post any inappropriate messages      //
// Either me or facebook might then cease to run this service    //
//                                                               //
// This service has no guaranteed uptime nor support             //
// However you may ask Questions in the Spacialaudio Forums      //
// I will probably come back to you and help                     //
//                                                               //
// The Webservice talking with facebook will stay private        //
// At least until its completely done and tidied up              //
//                                                               //
// To Register just go to following Website, login to facebook   //
// you will be shown 3 different pages where you have to click   //
// Accept / Allow at the bottom of each page                     //
// If something went wrong you can always start over             //
//                                                               //
// http://apps.facebook.com/sambcsonginfo/?                      //
///////////////////////////////////////////////////////////////////


var Player : TPlayer;
var Song : TSongInfo;
var facebookmessage, returnmessage, logdir, threshold, userid, network : String;
var ErrorLog, DebugLog : TStrings;


///////////////////////////////////////////////////////////////////
// User Configuration Area                                       //
///////////////////////////////////////////////////////////////////
// SAM will create 2 Logfiles:                                   //
// facebook.log contains the IDs of successful postings          //
// facebook.err contains the Error Codes if something went wrong //
// IMPORTANT: Keep the trailing backslash (\) !!!                //
//                                                               //
// Jingle Threshold:                                             //
// Every Title shorter than the threshold will not be published  //
//                                                               //
// User ID:                                                      //
// Your Facebook User ID (Number with up to 20 digits            //
// You'll get that when you register with the app                //
//                                                               //
// Network:                                                      //
// facebook is the only working input here                       //
// Further options will be added here later                      //
///////////////////////////////////////////////////////////////////
//                                                               //
{}    logdir := 'C:\Program Files (x86)\SpacialAudio\SAMBC\';    {}
{}    threshold := '+00:00:25';                                  {}
{}    userid := 'CHANGEME';                               {}
{}    network := 'facebook';                                     {}
//                                                               //
///////////////////////////////////////////////////////////////////
// No Changes below this Point unless you know what you do.      //
///////////////////////////////////////////////////////////////////


PAL.Loop := true;

// URL Encode
// Replaces non Alphanumeric symbols by their numeric representation
// and converts that one to hex prepending the % sign
function urlencode(S: string): string;
begin
  var Idx : integer;
  var tvar : integer;
  result := '';

  if (Length(S)) > 0 then begin

  For Idx := 1 to length(S) do
    begin
      tvar := Ord(S[Idx]);
      if ((tvar > 47) and (tvar < 58)) or ((tvar > 64) and (tvar < 91)) or ((tvar > 96) and (tvar < 123))  Then
        begin
         result := result + (S[Idx])
        end
      else
        begin
         result := result + '%' + IntToHex(Ord(S[Idx]),2);
        end;
   end;
   end;
end;


// Append to File is not possible so we have to load the old contents.
ErrorLog.LoadFromFile(logdir + 'facebook.err');
DebugLog.LoadFromFile(logdir + 'facebook.log');

Player := ActivePlayer;

// Is anything playing right now?
IF ( Player <> NIL ) THEN
BEGIN
  Song := Player.GetSongInfo;

  // Message to display in Facebook
  facebookmessage := Song['title'] + ' - ' + Song['artist'];

  // URLEncode Blanks
  PAL.LockExecution;
  facebookmessage := urlencode(facebookmessage);
  PAL.UnlockExecution;

  // Here goes the magic!
  returnmessage := WebToStr('http://www.xenzilla.de/radioscript/'
    + '?message=' + facebookmessage + '&userid=' + userid + '&dest=' + network);

  // Errormessages don't contain the underscore
  IF ( Pos('_', returnmessage) = 0 )  THEN
  BEGIN
    returnmessage := DateTimeToStr(NOW) + '  ' + returnmessage;
    Writeln(returnmessage);
    ErrorLog.Add(returnmessage);
    ErrorLog.SaveToFile(logdir + 'facebook.err');
  END
  // For debugging purposes Successful Posts will be logged too
  ELSE
  BEGIN
    returnmessage := DateTimeToStr(NOW) + '  ' + returnmessage;
    Writeln(returnmessage);
    DebugLog.Add(returnmessage);
    DebugLog.SaveToFile(logdir + 'facebook.log');
  END;
END;

// Alll done wait for track change
PAL.WaitForPlayCount(1);
// Jingles & Co will not be posted, if  shorter than threshold (adjustable)
PAL.WaitForTime(threshold);


Please use it wisely. If you post spam or things that are against facebooks TOS, the service will cease to exist.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Last edited by Mastacheata on April 29th, 2011, 6:16 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: March 3rd, 2010, 12:22 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7572
Location: Aachen (Germany)
Here goes another update:
  • Changed the Web Scripts Parameters
  • Twitter support now available
  • Prefilled PAL Script at registration

I updated the Top Level Post to be more clear.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: March 3rd, 2010, 1:31 pm 
Offline
Alumni
Alumni

Joined: March 11th, 2003, 1:34 pm
Posts: 9959
Location: Maui, HI
Thank you for sharing/giving information and services to the community.

_________________
- Steve Kunitzer
- SVS (Spacial Volunteer Support) / Forum Administrator

Image
Image


Top
 Profile  
Reply with quote  
PostPosted: March 3rd, 2010, 7:49 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7572
Location: Aachen (Germany)
You're welcome.

I'd like to outline my motivation for this, maybe that's interesting for some of you:
This Project started mostly out of curiosity for the different web2.0 services. (They have really well documented APIs, but I really had no use for them)
I still don't see the real advantage of using social networks over traditional websites, but most people of my age and younger that are not that much into IT love these things.
And it's so much easier to just put in username and password for most people than to configure the webpages that come with SAM.

What was mostly interesting for me with this project is combining the only two programming languages I'm really good at. (I learned PASCAL at the CS course in school for 6 Years and I develop PHP Applications as a part time job next to studying at university)

Any feedback is greatly appreciated. Especially on the userfriendlyness part.
I'm a software developer and pretty much into the Computer thing, so it's not always obvious to me if things get too complicated.

The other thing is I don't use any of the international social networks privately.
So please if you'd like to see another one, drop me a note and I'll try to implement it.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: March 8th, 2010, 6:08 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7572
Location: Aachen (Germany)
Updated the PAL tonight:
It now has an Assistant that will guide you through the configuration.

EDIT (02.50 CET):
Just fixed the last issues with the config assistant. Would be nice if someone could test on their system.
The Filesystem / User Access Control in Vista / Win7 is a fiddly issue that's pretty hard to track in PAL.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: March 9th, 2010, 8:24 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7572
Location: Aachen (Germany)
New Option for Album Art added.
Will display the Album Art along with the now playing info on facebook.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: April 10th, 2010, 9:37 pm 
Offline
Senior User
Senior User

Joined: January 10th, 2006, 11:39 pm
Posts: 116
I set this up and I show it waiting for tracks to play and it updated my twitter once. Now it doesnt. any ideas? BPMRadioNet is my Twitter ID.

_________________
Last visit was: Fri Apr 11, 2008 1:35 pm


Top
 Profile  
Reply with quote  
PostPosted: April 15th, 2010, 5:36 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7572
Location: Aachen (Germany)
It works perfectly fine for me (except logging which I just repaired). You might have noticed that I posted some test messages on your behalf. (Feel free to delete 'em)

If it did produce logfiles (error.log / debug.log in the directory you specified) for you already please send them to me or attach them to this forum.
If not, try again with new version and then send me the logfiles. If it doesn't produce anything again, please contact me directly and we will try to sort this out in real-time.

Updated script can be found at the known location.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: April 17th, 2010, 1:31 am 
Offline
Senior User
Senior User

Joined: January 10th, 2006, 11:39 pm
Posts: 116
I redownloaded the file, and reconfig'd, I got Log files this time where as before i was not. going to test overnight and see how it posts. Thanks for getting back to me! I Will update sometime this weekend my results.

_________________
Last visit was: Fri Apr 11, 2008 1:35 pm


Top
 Profile  
Reply with quote  
PostPosted: April 20th, 2010, 3:06 pm 
Offline
Senior User
Senior User

Joined: March 10th, 2004, 12:29 am
Posts: 91
i hope that i am not too late to the party but im trying to use this pal with no luck yet. every time i try to turn it on it will crash sam.

i run my sam 4.5.6 on a windows server and i have 1 more simple pal running which is a voice overlay.


Top
 Profile  
Reply with quote  
PostPosted: April 20th, 2010, 4:55 pm 
Offline
Alumni
Alumni

Joined: December 20th, 2006, 9:23 pm
Posts: 12211
Location: Show Low, AZ
You might also try updating to the LATEST version of SAM, 4.6.4 available to all legitimate SAM customers in the CLIENTS area (upper right corner of this screen.)

_________________
Andrew Cannon
(SVS) Spacial Volunteer Support

WE DANCE AS ONE: A Celebration In Groove
All That Is GOOD In Dance Music from the
70's, 80's, 90's and Now... plus some of the
best DJs from around the world.
http://www.wda1.com


Top
 Profile  
Reply with quote  
PostPosted: April 21st, 2010, 5:56 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7572
Location: Aachen (Germany)
Does it tell you any message when crashing?
Or does it just hang for some time (can vary between 5 sec to 1 min or so)
The latter is a known issue that I was not yet able to resolve.
It also seems to vary depending on time of day and star constellation (e.g. not reproducable and not depending on system load or so)

Have you been able to configure the script?
Did it run at any time or does your sam crash immediately after loading the script?

Please give me as much info as possible, even if it may seem obvious.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: April 22nd, 2010, 7:35 am 
Offline
Senior User
Senior User

Joined: March 10th, 2004, 12:29 am
Posts: 91
it takes a few senconds, about 5 sec max, and then sam shuts down with no warnings. the configuration process seems ok to me, it does ask me a few question like you mentioned on your post.

i tried in diffenrent ways. using facebook and twitter, using only twitter, using only facebook.

i have to say i never got the confirmation for facebook after clicking on your link but i did got it for twitter. but i did follow the instructions to use the id number for facebook when the pal script ask for the account.

do i have to open the file in my text editor and do anything to it?

thanks.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 712 posts ]  Go to page 1, 2, 3, 4, 5 ... 48  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: theloler and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group