Search

well, i was wrong. everything was working great. my client just hadn't tweeted in several days and the search didn't turn any results... any well to pull a timeline with this extension?

Sure you can. I'm just using another library for the actual twitter stuff, so you can do anything that lib can do.

Check out the examples for starters.

Very nice indeed! Thanks!

So I swapped out this line:

$reply = $cb->search_tweets('q=from:atheycreek&count=3', true);

with this:

$reply = $cb->statuses_homeTimeline();

and it gives me an HTTP status of 400 with the words " Bad Authentication data." Any ideas? I left the working code intact that authenticated using the tokens and such.

Have you seen the introduction text for the last example? The reason the search works but the statuses does not is because I am explicitly telling twitter to use only app auth, and not the end-user auth.

So, you can try this (completely untested!):

$reply = $cb->statuses_userTimeline('username', true);

I was able to get it to work... I had to add access token and access secret to the Symphony config file.

Here is a gist of my working code to grab a home_timeline using Twitter's 1.1 API:

https://gist.github.com/jsimcoe/7141486

Thanks for the help mate!

Ah, yes. Completely forgot you can of course just provide these details rather than working around them :)

remote json seems to be deprecated, so turning to remote xml seems obvious.

the following error occuired, and I'm not able to debug this futher:

<error>Transformed XML is invalid.</error>
    <errors>
        <item>loadXML(): Start tag expected, '&lt;' not found in Entity, line: 1</item>
        <item>loadXML(): Start tag expected, '&lt;' not found in Entity, line: 1</item>
    </errors>

the esty api call was something like:

https://openapi.etsy.com/v2/shops/shop:id/listings/active?api_key=api:key

the rw data from etsy is shown in the debug output to, so auth and this things working. How Can I debug the xml build prozess step by step?

@moma what version of Symphony and Remote Datasource are you using? I don't think JSON as a remote source is deprecated.

If you make a cURL request to that URL what does the resulting XML response look like?

It's probably worth starting a new thread for this though as it's more in regard to the Etsy API than Twitter and it will make it easier to find later on.

sorry, forgot this :(

Remote Datasource Extension 2.1.1 symphony-version 2.5.2

so after cleaning cache:

Cannot redeclare class JSON on line 63 of file /var/www/htdocs/symphony/lib/toolkit/class.json.php

fetching the etsy url with wget, a JSON data as expected is served.

Cannot redeclare class JSON

Seems to be only problematic, when both the Remote Datasource extension and the JSON Datasource extension are installed.

After removing the Remote Datasource extension and Remote JSON Datasource extension and installing/enabling the Remote Datasource extension again, a valid xml was found in /manifest/cache/cacheabledatasource.

seems to be done :)

Ah, that explain it. :) They're both using the same class independently and trying to instantiate it. Remote Datasource is the extension you want to roll with. It's maintained by the Symphonists group and has support for JSON included. It doesn't seem like Dynamic JSON Data source is maintained (or required) any longer.

Sorry for the delay in reply. Glad you got it figured though.

hm, after a long time, I realiezed, that every chang to the datatsource (url/timeout/etc.) generates an error, descriped in post-48 . The only possibility I found to bypass that, is a complete uninstall and install of remote datasource.

when there is a posibility to debug that, Im glad to hear.

If you're able to moma, update to Remote Datasource 2.1.2. That was a bug that has recently been fixed.

What was happening is that when you create the datasource, we'd go off and fetch your resource and save the result to cache. When you'd go to use your datasource on the frontend, it would already be cached because it was created in the backend. The problem was that the backend didn't store the resource the same way as the frontend did, which caused the transformed XML error.

thx, brendo for the explanation too. I've updated, and everything gone right.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details