Jump to content

Twitter Feed (MarkupTwitterFeed)


ryan

Recommended Posts

  • 1 month later...

@jean-luc I've installed your fork of the module but am having a couple of issues with getting it to display correctly. Using the Specifying options example: I can't get images from Twitter to display. If I try Or you can iterate the feed rather to generate your own markup... I get an error – Error: Exception: Method MarkupTwitterFeed::renderItem does not exist or is not callable in this context (line 519).

Link to comment
Share on other sites

After a bit of further work, I'm now getting a parse error – Parse Error: syntax error, unexpected '[', expecting ')' (line 284 of /var/www/xxxxxx/site/modules/MarkupTwitterFeed/MarkupTwitterFeed.module)

The line in question is –

$linkHtml = str_replace(['{href}', '{url}'], [wire('sanitizer')->entities($u['expanded_url']), $u['display_url']], $options['listItemLink']);

Link to comment
Share on other sites

On 23/11/2017 at 1:46 PM, houseofdeadleg said:

After a bit of further work, I'm now getting a parse error – Parse Error: syntax error, unexpected '[', expecting ')' (line 284 of /var/www/xxxxxx/site/modules/MarkupTwitterFeed/MarkupTwitterFeed.module)

The line in question is –

$linkHtml = str_replace(['{href}', '{url}'], [wire('sanitizer')->entities($u['expanded_url']), $u['display_url']], $options['listItemLink']);

@houseofdeadleg So far, no idea of what could be wrong. Can you open an issue in https://github.com/jlj/MarkupTwitterFeed/issues, so we can investigate it further without adding too many message to this topic? :) (Please describe your configuration (version of PW, of php, …) and include a fragment of the template code in your site that shows the problem)

Link to comment
Share on other sites

  • 1 month later...

What's causing all my tweets to get truncated? $tweet[text] is trimmed at a set length and then outputs a link to the rest.

Edit: The reason for this was that you need to request with tweet_mode => extended to get the new character limit from twitter. I was having a few other issues with this seemingly abandoned module and I needed this quickly so I ended up using another twitteroauth script instead and making my own. I assume to edit this into the module you'd add

$params['tweed_mode'] = 'extended';

In MarkupTwitterFeed.module before the request on line 143, but I haven't tried it.

Link to comment
Share on other sites

  • 1 year later...

Using php 8.1 and getting the usual errors for 8.1

PHP message: PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in /httpdocs/site/modules/MarkupTwitterFeed/tmhOAuth/tmhOAuth.php on line 545

 

Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...