Myspace XML-RPC

Discussion corner for Developers of Serendipity.
gmcle454

Myspace XML-RPC

Post by gmcle454 »

Is it possible to duplicate a s9y post into myspace? If so how? Is there something like the LJ-Update plugin that I could use?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Myspace XML-RPC

Post by garvinhicking »

You would need to create a new plugin; the LJ-Update plugin could help as a foundation for that.

There is no abstract way of cloning posts, because each provider has their own API usually. Maybe myspace has a RSS import?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

thanks for the quick reply, I'll look into it.
gmcle454

Post by gmcle454 »

I found this php script for WordPress and this hack for WordPress. Both are in PHP.

Unfortunately, I'm **VERY** new to PHP, so this may be a dumb question. Is it possible to modifying these scripts, and where would I start if I were up for such a challenge?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Yes, I guess you could port these scripts with some effort.

Wait a moment and I'll port the scripts for you.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

You can overwrite your LJ Update plugin with this file:

http://nopaste.php-q.net/183805

Then you can configure the LJ Update plugin to use "MySpace" posting. Your PHP provider needs to support CURL functionality for this to work!

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

I am already using the LJUpdate. Can I copy the plugin installation and then make the modifications to the new copy? or will that bork something? CURL is enabled with my host.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

How do you mean that? Do you want to publish your entries to BOTH LJ AND MySpace?

I would suggest you to consider this :) Currently, you cannot use both postings methods in conjunction, because you can only install that plugin once.

If I misunderstood you and you only want to use MySpace posting: Just edit the existing serendipity_event_ljupdate.php file and paste the code from the link above.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

I do want to post both places (LiveJournal and MySpace) simultaniously when I update my s9y blog. Unfortunalely, I've got friends on both who want to keep read it through their respective friends/subscriptions system. I wish they would just come to my site, but they are set in their ways.

Is this not possible?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Can you try to install the plugins two times (from the s9y plugin configuration panel - not copying the plugin core files twice)? Reading the code, this seems to be possible. Then you can configure the one plugin to post to LJ and the other plugin to post to MySpace...

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

I somehow managed to install twice--I think. It shows up twice in my configure plugins panel, but there is not a second directory in the file system. The settings now have a pull-down menu for myspace or lj. I've put in appropraite infor for each, and lj is still working perfectly. But nothing has shown up in myspace yet.

Should there be a second ljupdate directory in the plugins directory?

I need to make sure I've got the right myspace server.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

No, one directory is perfectly fine. That's how I meant it.

If the posting does not show up in myspace, it might be because the original script you linked to can be buggy. There's no debugging output in the LJ plugin, but that can easily be added.

Please try this file, which contains information about what's going on:

http://nopaste.php-q.net/184043

Best regards,Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

I pasted that code into the ljupdate.php file and it broke s9y
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

That does not help me much. Which kind of error do you get? :-)

Did you properly paste the code? Maybe you introduced additional linebreaks or uploadde the file wrongly.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

Here's the error:

Code: Select all

Parse error: parse error, unexpected '.' in /home/content/g/m/c/gmcle454/html/serendipity/plugins/serendipity_event_ljupdate/serendipity_event_ljupdate.php on line 205
I downloaded the file and opened it in DreamWeaver (the same program I've used to do all the other modifications to my journal and design my site)
I selected everything and deleted it, then pasted in your code from the link you sent.
Post Reply