Jump to content


Photo

Module: Twitter Puller


  • Please log in to reply
30 replies to this topic

#21 formmailer

formmailer

    Sr. Member

  • Members
  • PipPipPipPip
  • 263 posts
  • 46

  • LocationHudiksvall, Sweden (but originally from The Netherlands)

Posted 25 November 2011 - 01:58 AM

This is very much work in progress and I don't recommend anyone to use this on live site just yet, since there is few rough edges I want to solve first.


Antti, is the above still true?

/Jasper

#22 Biscuit

Biscuit

    Jr. Member

  • Members
  • PipPip
  • 13 posts
  • 0

Posted 25 November 2011 - 05:41 PM

Antti, is the above still true?

/Jasper


Dohhhhhh! My bad, I totally missed that. I could swear I saw "Release" somewhere on this module. Once I get a firmer grasp of PW's ins and outs, I'd be happy to contribute what brain cells I have left to working out the kinks.

#23 apeisa

apeisa

    Hero Member

  • Moderators
  • 3,151 posts
  • 1697

  • LocationVihti, Finland

Posted 25 November 2011 - 06:03 PM

I am using this on lukio.fi site and it works nicely. I have not looked into codebase in a long time, but if you guys want to use this and run into any problems, I will definitely help you and improve this module.

#24 statestreet

statestreet

    Full Member

  • Members
  • PipPipPip
  • 52 posts
  • 11

Posted 04 December 2011 - 07:01 PM

Ryan, I'm trying to use your minimalist Twitter module (Apeisa's looks great but has more features than I need) and for some reason can't get my feed to load. Any idea what I might be doing wrong here?

This is what I have in the template file:
$t = new MarkupTwitterFeed(); 
echo $t->render("http://twitter.com/statuses/user_timeline/14601766.rss");

And this is what it renders:
MarkupTwitterFeed: Unable to load http://twitter.com/statuses/user_timeline/14601766.rss

The link resolves when I paste it into my browser, so I'm not sure what I'm doing wrong.

#25 ryan

ryan

    Reiska

  • Administrators
  • 7,783 posts
  • 6527

  • LocationAtlanta, GA

Posted 05 December 2011 - 01:30 PM

Statestreet, I just realized I didn't have this on GitHub, so I posted it to there, just in case you've got an earlier version. Here is the version that I am currently using on processwire.com for the Twitter feed that appears throughout the site:
https://github.com/r...rkupTwitterFeed

I'm wondering if your PHP might have allow_url_fopen disabled? You can find out by looking at your phpinfo(), i.e. put this on your server in a PHP file (like test.php) and load in your browser:

<?php phpinfo();

I am guessing that you might have the allow_url_fopen option disabled, and that would prevent this module from being able to load the RSS feed.

If you find that the option is enabled, then next check your Twitter RSS URL. Logout of Twitter and see if it still works? If I recall, some of Twitter's RSS feeds don't work unless you are logged in with the same browser you are retrieving them from, and you may have to enable access to it somewhere in your Twitter settings... it's been awhile since I've looked at this, so not positive what the current deal is there. But something to look at. Please let me know what you find.

#26 statestreet

statestreet

    Full Member

  • Members
  • PipPipPip
  • 52 posts
  • 11

Posted 06 December 2011 - 12:51 AM

Ah, that was it. I added a php.ini to the ProcessWire root with 'allow_url_fopen = true;' and it's working great now. Thanks for the help, and thanks for putting the module on GitHub!

#27 Mattias

Mattias

    Starter

  • Members
  • 1 posts
  • 0

Posted 17 February 2013 - 03:09 AM

Hi guys!

 

My first post and I have a problem with Data Import Module. I found processwire yesterday and it looks very promising for what I am looking to to do.

 

I keep on running into an error.

  

TemplateFile: Duplicate entry 'mariestads-julebrygd-1008' for key 'name_parent_id' INSERT INTO pages SET parent_id=1008, templates_id=43, name='mariestads-julebrygd', modified_users_id=41, status=1, sort=192,modified=NOW(), created=NOW(), created_users_id=41

 

When I run data import again it will add around 30 new products then the same error occurs. The xml that i need to read in is fairly large 15.000 products, by running the import a few times i manage to add around 150 products and all the data looks valid and in the right place. The file is in Swedish with ÅÄÖ chars in some values.

 

Here is a screen shot with the error message https://docs.google....dit?usp=sharing

 

Here is the XML file: http://www.systembol...aspx?Format=Xml

 

 

Thank you /mattias



#28 apeisa

apeisa

    Hero Member

  • Moderators
  • 3,151 posts
  • 1697

  • LocationVihti, Finland

Posted 17 February 2013 - 03:37 AM

Hi Mattias and Welcome to PW. I haven't touched in Data Import module in two years and if I recall correctly I got it working "OK" with JSON but had lot's of issues with XML. As it states on module page (http://modules.proce...ss-data-import/) it is a non working module.

 

I am not currently looking to finish that module, so your best bet would be building custom importer (those are fun to do and we are here to help you).



#29 Soma

Soma

    Hero Member

  • Moderators
  • 5,041 posts
  • 3794

  • LocationSH, Switzerland

Posted 17 February 2013 - 08:10 AM

Mademyday used this module the other day and got it working. I was also surpized as i didnt knew this module.

@somartist | modules created | support me, flattr my work flattr.com


#30 ryan

ryan

    Reiska

  • Administrators
  • 7,783 posts
  • 6527

  • LocationAtlanta, GA

Posted 17 February 2013 - 09:30 AM

That error just indicates that there is a name collision when creating a new page. In this case, there is already a page called mariestads-julebrygd and it's trying to insert a new page with the same name (in the same parent). All that would need to be done here is just to make sure that the imported records are unique in whatever is being  set to the $page->name field. If there is an ID column of some sort in the XML source data, that would be a good one to use for a $page->name field. 



#31 apeisa

apeisa

    Hero Member

  • Moderators
  • 3,151 posts
  • 1697

  • LocationVihti, Finland

Posted 17 February 2013 - 10:19 AM

If xml is simple enough it should work. If there are attributes etc it will fail.

Maybe I should finish this. Thinking of making one version for json and another for xml. Or better yet, making these and csv importer working in harmony (sharing some bits of code like mapping etc).






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users