-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The only result is a for each error #93
Comments
same here |
Yup. I see the same error. |
That is strange, do you have an endpoint I can try out? |
PHP. Unfortunately, I can not share the endpoint on this post due to client confidentiality.
The In case it is useful, I have downloaded the files via bower. |
@simonleadbetter is your PHP file hosted somewhere on a server? Like can you call that page via postman or browser directly? Just curious if it's returning any response. |
It is, but I can not publish the URL as the site is in development. Is there a way I can share the URL with you so it is not public? The tweetie.php file is executing on the server. |
I'm getting the same thing using the timeline endpoint. This is the response from twitter: Browser console error:
Same thing testing with other endpoints. The username I'm searching for is also being ignore and the response is for the user that created the twitter app to get the keys. |
I fixed my issue with the username. The params were getting lost. I now get the tweets from the user, but the foreach error is still the same. New response: https://gist.github.com/robwent/1b460cf4a96cf43e1e34428cb4390057 |
I've uploaded to a demo site if that's any easier: https://ovrr.to/Lc6Lq The tweets should show next to the news section. I've tried different versions of jQuery but got the same result with all of them. |
There are 2 tweetie.min.js files in the dist folder. The first one is the one that causes the foreach error. The secodnd one in dist/dist that gets built by webpack shows:
I got rid of the foreach error using this: https://stackoverflow.com/a/35970005/931438 But then I got other errors related to the month strings. Makes me wonder if it's the es version bable is compiling to, but for now, I've gone back to 2.4.3 and got that working with the server version from 3. |
@robwent I just checked out your website, it looks like the |
oh la la, I didn't think about that. I just got it working with a mixture of the old/new versions, but I'll test that out and let you know. |
I still get the same when the response is returned with the header: |
@robwent that is strange, do you have link I can check out? |
Not live, but it will return the json header by changing the url to So I put the latest js version back and changed the js to use the settings params array and got the same foreach error. I'll try it out again later as I'd like to use more than the old templating placeholders. |
Any solution? I have same issue. |
I've got the same issue too. Any update on this? |
No matter what the settings, the function only returns an error:
TypeError: e.forEach is not a function
I assume this is returning no results, but everything seems to be set correctly.
$('.tweetfeed').tweetie({ "url": "/api/", "type": "timeline", "template": "<li>{{tweet.created_at}} - {{tweet.text}}</li>", "dateFormat": "%b %d, %Y", "params": { "count": 15 } });
The text was updated successfully, but these errors were encountered: