Jump to content
vayu

MarkupTwitterFeed - where do I get the feed?

Recommended Posts

Hi, I have just installed the MarkupTwitterFeed module, but for some reason I cannot find the right feed.

I have created a Twitter app and maybe it is because I am doing it wrong in the process of doing that.

Would anyone mind guiding me in the right direction to getting the right feed?

By the way, the link to the Twitter application page is leading to a 404 github page here https://github.com/ryancramerdesign/MarkupTwitterFeed

Thanks

Vayu

Share this post


Link to post
Share on other sites

Is it possible to use this module to render multiple feeds from different timelines now that you have to provide a consumer tokens etc? I was using the old version to render two twitter timelines to a page. 

Share this post


Link to post
Share on other sites

Hi Ben.

Do you have an idea of how to get it working, what am I missing?  Can you get it working with a single feed?

Share this post


Link to post
Share on other sites

I find it amusing that twitter requires auth, when pulling public tweets... Boring.

</rant>

  • Like 2

Share this post


Link to post
Share on other sites

got one timeline working. I might try duplicating the module, giving it a new name and adding it as a second module to see if that works for two separate user timeline renders.

Share this post


Link to post
Share on other sites

Could I see the code for a working example?  I still don't know why I cannot get it to work.  I am guessing it's my Twitter app I have created the wrong way, but am not sure.

Share this post


Link to post
Share on other sites

Hi Soma. Yes, I saw that yesterday and downloaded it right away.  But what is the feed that I enter into the $t = $modules->get('What-goes-here');  Can I see a working example?

Share this post


Link to post
Share on other sites

struggling here to get PW to see my new module :/

got the dup module to show, just testing whether it renders

Share this post


Link to post
Share on other sites

Hi Soma. Yes, I saw that yesterday and downloaded it right away.  But what is the feed that I enter into the $t = $modules->get('What-goes-here');  Can I see a working example?

It was updated 4 hours ago...

Yes there's a readme with examples...

Share this post


Link to post
Share on other sites

OK so bit of a hack but heres how i got 2 timelines within PW. Maybe in the future the twitter module could include multiple users...?

1) Created one instance using the twitter module:

- implemented the latest version of the twitter module - on github

- created an app on twitter using the user of the timeline i wanted to show (in this case Virgin) dev.twitter.com

- for some reason it didnt authenticate straight away so I signed into twitter.com and went to app settings and found my new app at the top with read-only permissions.

- went back to my app on dev.twitter.com and add my new keys.

2) Duplicated the twitter module

- changed the name of the module folder to MarkupTwitterFeed2, the file MarkupTwitterFeed2.module and the class within to MarkupTwitterFeed2 (instead of MarkupTwitterFeed)

- uploaded to modules folder and installed like normal in PW

3) rendering

- I created a new template duplicating my first twitter template (which i happened to do as if it was a widget on the page and thus could be used by any page)

- <? php $t = $modules->get('MarkupTwitterFeed2');

and TADA! you've got two timelines...

e.g. http://www.virgintribesa.com/

Share this post


Link to post
Share on other sites

Hi Arjen and Soma.

Thanks for helping.  I am running the latest version and have been for the last day or so.  I realize that Ryan has made a couple of changes today, but I am running version 2.0 and have been ever since I posted this first post. :-)  I have now updated it again from github, just like I did last night.

I have just found out what I was missing.  I had not seen that I could enter the Twitter app settings via the module settings: https://www.evernote.com/shard/s3/sh/20c34a3b-47fa-45da-b303-3dbea2adddb4/62e355680244c10271847a66dc91b753.  It all makes sense now.

One other thing I might like to ask is how to set a locale.

I tried this:

setlocale(LC_TIME, "da_DK");
$t = $modules->get('MarkupTwitterFeed');


But it won't work.  Any ideas? My site can be seen here: http://vrweb.dk/
 

Share this post


Link to post
Share on other sites

I'm glad vayu solved his problem but I can't solve mine. I have updated the module, created a twitter app and retrieved the consumer key & secret and access token & secret, entered them into the module settings but still get "Error retrieving Twitter status".

Is there some extra step when creating the app? Their documentation is horrible.

It seems for the module to work all I should need is the oauth settings and any other info in the app is arbitrary (i.e needed for the app but not for the module. What am I missing?

EDIT:

I've got a new error message:

Error    Call to undefined function wireRmdir() (line 195 of /home/checkere/www/www/site/modules/MarkupTwitterFeed/MarkupTwitterFeed.module)

Maybe I should see about using the embedded feed for now.

Share this post


Link to post
Share on other sites

@vayu, you might want to use strftime since that will respect your locale. So you might want to convert it. Can't really tell if that's best practice but it might work.

@digitex, I made a mistake updating my code partially. Make sure you use:

$t = $modules->get('MarkupTwitterFeed'); 

instead of:

$t = new MarkupTwitterFeed;

That worked for me.

Share this post


Link to post
Share on other sites

@vayu, you might want to use strftime since that will respect your locale. So you might want to convert it. Can't really tell if that's best practice but it might work.

@digitex, I made a mistake updating my code partially. Make sure you use:

$t = $modules->get('MarkupTwitterFeed'); 

instead of:

$t = new MarkupTwitterFeed;

That worked for me.

Hey Arjen.

That's where the different errors came from. Originally I had:

$t = new MarkupTwitterFeed;

Which returned "Error retrieving Twitter status" which at least proved the module was installed and working.

I switched to:

$t = $modules->get('MarkupTwitterFeed');

which is when I got "Error    Call to undefined function wireRmdir() (line 195 of

/home/checkere/www/www/site/modules/MarkupTwitterFeed/MarkupTwitterFeed.module)"

I then abandoned the module for Twitteroauth and used:

<?php
session_start();
require_once("twitteroauth/twitteroauth/twitteroauth.php"); //Path to twitteroauth library
 
$twitteruser = "digitex";
$notweets = 3;
$consumerkey = "1234345667";
$consumersecret = "244556667";
$accesstoken = "23456676788";
$accesstokensecret = "2345667889";
 
function getConnectionWithAccessToken($cons_key, $cons_secret, $oauth_token, $oauth_token_secret) {
  $connection = new TwitterOAuth($cons_key, $cons_secret, $oauth_token, $oauth_token_secret);
  return $connection;
}
 
$connection = getConnectionWithAccessToken($consumerkey, $consumersecret, $accesstoken, $accesstokensecret);
 
$tweets = $connection->get("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=".$twitteruser."&count=".$notweets);
 
echo json_encode($tweets);
?>

Which worked and loaded the feed but not in a very presentational way. I'm convinced now the twitter app I created is correct but the implementation with or of the module is not. I'm not suggesting the module doesn't work since it obviously does for others, just that something is set up wrong for me.

Share this post


Link to post
Share on other sites

Last report before I give up on this S---.

I went ahead and updated the module on a different site, different server, same version of PHP but different host and it worked like a charm. So, now I'm a little closer to figuring it out.

The problem site has another issue. I tried to uninstall the MarkupTwitterFeed module and got a new error. It won't uninstall. I might try going in through PHPMyAdmin and doing it that way and then see if I can start over with it.

Share this post


Link to post
Share on other sites
which is when I got "Error    Call to undefined function wireRmdir() (line 195 of

/home/checkere/www/www/site/modules/MarkupTwitterFeed/MarkupTwitterFeed.module)"

u need.to upgraded yer processwires ver 2.3

  • Like 1

Share this post


Link to post
Share on other sites

@arjen,thanks for the tip, but it looks like strftime is used in the code of the module.  Furthermore, it looks like the only thing regarding the date, that can be changed via the parameters is the date format.  I don't see any way to hook into the code to change the date output.

Share this post


Link to post
Share on other sites

I went to update to v2 today and noticed that it is not showing up in the modules manager. Thought I'd uninstall and see if that helped, but got this error:

DirectoryIterator::__construct(/xxx/site/assets/cache/MarkupTwitterFeed/): failed to open dir: No such file or directory

The directory doesn't exist - not sure why. Anyway, manual upgrade seems to be fine.

Another thing - the link from the Github page:

"To obtain these, create a new Twitter application at: https://dev.twitter.com/apps."

is broken!

Share this post


Link to post
Share on other sites

I went to update to v2 today and noticed that it is not showing up in the modules manager. Thought I'd uninstall and see if that helped, but got this error:

DirectoryIterator::__construct(/xxx/site/assets/cache/MarkupTwitterFeed/): failed to open dir: No such file or directory

The directory doesn't exist - not sure why. Anyway, manual upgrade seems to be fine.

Another thing - the link from the Github page:

"To obtain these, create a new Twitter application at: https://dev.twitter.com/apps."

is broken!

I'm having the same issue with the module error and havent been able to get the new module working with Ryan's Blog template yet :(

Share this post


Link to post
Share on other sites

Just to clarify - I am not having any problems with the new version of the module working at all. My comments were strictly related to upgrading and the link on the GitHub page. 

Can you provide anymore info on why the new module isn't working for. No output, errors, what?

I was getting errors initially because I was using:

$t = new MarkupTwitterFeed();

but switching to:

$t = $modules->get('MarkupTwitterFeed'); 
 

fixed everything.

Does that help?

Share this post


Link to post
Share on other sites

u need.to upgraded yer processwires ver 2.3

looks like u. right. Not workin wit ver 2.2.9 :lol:

That may have just saved me a wack of trouble. Didn't realize it was 2.3 compatible only. Thanks Willy.

Edit June 18: upgraded PW to 2.3 and twitter feed is up again. Note to self: read compatibility before spending 5 hours troubleshooting.

Share this post


Link to post
Share on other sites

Hi guys,

Having problems with this module. Using PW 2.3 and the latest version of this Module. 

I've put in all the information required in the module admin page and double checked that the information is correct, but no matter what I try, I keep getting 

"Error retrieving Twitter status" 

With nothing being logged to the errors.txt log file.

Any ideas what it could be? I'm running PHP 5.4 on Debian 7.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Mike Rockett
      Jumplinks for ProcessWire
      Release: 1.5.56
      Composer: rockett/jumplinks
      Jumplinks is an enhanced version of the original ProcessRedirects by Antti Peisa.
      The Process module manages your permanent and temporary redirects (we'll call these "jumplinks" from now on, unless in reference to redirects from another module), useful for when you're migrating over to ProcessWire from another system/platform. Each jumplink supports wildcards, shortening the time needed to create them.
      Unlike similar modules for other platforms, wildcards in Jumplinks are much easier to work with, as Regular Expressions are not fully exposed. Instead, parameters wrapped in curly braces are used - these are described in the documentation.
      Under Development: 2.0, to be powered by FastRoute
      As of version 1.5.0, Jumplinks requires at least ProcessWire 2.6.1 to run.
      View on GitLab
      Download via the Modules Directory
      Read the docs
      Features
      The most prominent features include:
      Basic jumplinks (from one fixed route to another) Parameter-based wildcards with "Smart" equivalents Mapping Collections (for converting ID-based routes to their named-equivalents without the need to create multiple jumplinks) Destination Selectors (for finding and redirecting to pages containing legacy location information) Timed Activation (activate and/or deactivate jumplinks at specific times) 404-Monitor (for creating jumplinks based on 404 hits) Additionally, the following features may come in handy:
      Stale jumplink management Legacy domain support for slow migrations An importer (from CSV or ProcessRedirects) Feedback & Feature Requests
      I’d love to know what you think of this module. Please provide some feedback on the module as a whole, or even regarding smaller things that make it whole. Also, please feel free to submit feature requests and their use-cases.
      Note: Features requested so far have been added to the to-do list, and will be added to 2.0, and not the current dev/master branches.
      Open Source

      Jumplinks is an open-source project, and is free to use. In fact, Jumplinks will always be open-source, and will always remain free to use. Forever. If you would like to support the development of Jumplinks, please consider making a small donation via PayPal.
      Enjoy! :)
    • By BitPoet
      As threatened in Ryan's announcement for 3.0.139, I built a little module for sliding toggles as a replacement for checkboxes. Styling of the input is CSS3 only (with all the usual caveats about older browsers), no JS necessary, and may still be a bit "rough around the edges", so to speak, since I didn't have much time for testing on different devices or brushing things up enough so I'd feel comfortable pushing it to the module directory. But here's the link to the GitHub repo for now:
      InputfieldSlideToggle
      Fieldtype and Inputfield that implements smartphone-style toggles as replacement for checkbox inputs. The visualization is CSS-only, no additional JS necessary.
      Status
      Still very alpha, use with caution!
      Features / Field Settings
      Size
      You can render the toggles in four different sizes: small, medium, large and extra large.
      Off Color
      Currently, "unchecked" toggles can be displayed either in grey (default) or red.
      On Color
      "Checked" toggles can be rendered in one of these colors: blue (default), black, green, grey, orange or red.
      Screenshots

      Some examples with checkbox label


      View all Size and Color Combinations
      Small toggles Medium toggles Big toggles Extra big toggles  









    • By Orkun
      Hi Guys
      I needed to add extended functionalities for the InputfieldDatetime Module (module is from processwire version 2.7.3) because of a Request of Customer.
      So I duplicated the module and placed it under /site/modules/.
      I have added 3 new Settings to the InputfieldDatetime Module.
      1. Day Restriction - Restrict different days based on weekdays selection (e.g. saturday, sunday) - WORKING

       
      2. Time Slots - Define Time slots based on custom Integer Value (max is 60 for 1 hour) - WORKING

       
      3. Time Range Rules per Weekday - Define a minTime and MaxTime per Weekday (e.g. Opening Hours of a Restaurant) - NOT WORKING PROPERLY

       
      The Problem
      Time Slots and Day Restriction working fine so far. But the Time Range Rules per Weekday doesn't work right.
      What should happen is, that when you click on a date, it should update the minTime and maxTime of the Time Select.
      But the change on the select only happens if you select a date 2 times or when you select a date 1 time and then close the datepicker and reopen it again.
      The time select doesn't get change when you select a date 1 time and don't close the picker.
      Here is the whole extended InputfieldDatetime Module.
      The Files that I have changed:
      InputfieldDatetime.module InputfieldDatetime.js jquery-ui-timepicker-addon.js (https://trentrichardson.com/examples/timepicker/) - updated it to the newest version, because minTime and maxTime Option was only available in the new version  
      Thats the Part of the JS that is not working correctly:
      if(datetimerules && datetimerules.length){ options.onSelect = function(date, inst) { var day = $(this).datetimepicker("getDate").getDay(); day = day.toString(); var mintime = $(this).attr('data-weekday'+day+'-mintime'); var maxtime = $(this).attr('data-weekday'+day+'-maxtime'); console.log("weekday: "+day); console.log("minTime: "+mintime); console.log("maxTime: "+maxtime); var optionsAll = $(this).datetimepicker( "option", "all" ); optionsAll.minTime = mintime; optionsAll.maxTime = maxtime; $(this).datetimepicker('destroy'); $(this).datetimepicker(optionsAll); $(this).datetimepicker('refresh'); //$.datepicker._selectDate($(this).attr("id"),date); //$.datepicker._base_getDateDatepicker(); // var inst = $.datepicker._getInst($(this)); // $.datepicker._updateDatepicker(inst); /*$(this).datetimepicker('destroy'); InputfieldDatetimeDatepicker($(this), mintime, maxtime); $(this).datetimepicker('refresh'); */ // $(this).datetimepicker('option', {minTime: mintime, maxTime: maxtime}); } } Can you have a look and find out what the Problem is?
      InputfieldDatetime.zip
       
      Kind Regards
      Orkun
    • By teppo
      This module tracks changes, additions, removals etc. of public (as in "not under admin") pages of your site. Like it's name says, it doesn't attempt to be a version control system or anything like that - just a log of what's happened.
      At the moment it's still a work in progress and will most likely be a victim of many ruthless this-won't-work-let's-try-that-instead cycles, but I believe I've nailed basic functionality well enough to post it here.. so, once again, I'll be happy to hear any comments you folks can provide
      https://modules.processwire.com/modules/process-changelog/
      https://github.com/teppokoivula/ProcessChangelog
      How does it work?
      Exactly like it's (sort of) predecessor, Process Changelog actually consists of two modules: Process Changelog and Process Changelog Hooks. Hooks module exists only to serve main module by hooking into various functions within Pages class, collecting data of performed operations, refining it and keeping up a log of events in it's own custom database table (process_changelog.) Visible part is managed by Process Changelog, which provides users a (relatively) pretty view of the contents of said log table.
      How do you use it?
      When installed this module adds new page called Changelog under Admin > Setup which provides you with a table view of collected data and basic filtering tools See attached screenshots to get a general idea about what that page should look like after a while.
      For detailed installation instructions etc. see README.md.
       


    • By Gadgetto
      Status update links (inside this thread) for SnipWire development will be always posted here:
      2019-08-08
      2019-06-15
      2019-06-02
      2019-05-25
      If you are interested, you can test the current state of development:
      https://github.com/gadgetto/SnipWire
      Please note that the software is not yet intended for use in a production system (alpha version).
      If you like, you can also submit feature requests and suggestions for improvement. I also accept pull requests.
      ---- INITIAL POST FROM 2019-05-25 ----
      I wanted to let you know that I am currently working on a new ProcessWire module that fully integrates the Snipcart Shopping Cart System into ProcessWire. (this is a customer project, so I had to postpone the development of my other module GroupMailer).
      The new module SnipWire offers full integration of the Snipcart Shopping Cart System into ProcessWire.
      Here are some highlights:
      simple setup with (optional) pre-installed templates, product fields, sample products (quasi a complete shop system to get started immediately) store dashboard with all data from the snipcart system (no change to the snipcart dashboard itself required) Integrated REST API for controlling and querying snipcart data webhooks to trigger events from Snipcart (new order, new customer, etc.) multi currency support self-defined/configurable tax rates etc. Development is already well advanced and I plan to release the module in the next 2-3 months.
      I'm not sure yet if this will be a "Pro" module or if it will be made available for free.
      I would be grateful for suggestions and hints!
      (please have a look at the screenshots to get an idea what I'm talking about)
       




×
×
  • Create New...