Expand my Community achievements bar.

SOLVED

How do I import Twitter's new JSON feed into AEM?

Avatar

Former Community Member

Hi there,

With Twitter's updated API and change to only support JSON feeds, instead of RSS, the existing AEM 5.6.1 Feed Importer doesn't work for their feeds.  Is there another way to accomplish this i.e. import a JSON feed?

Thanks,

RKB.

1 Accepted Solution

Avatar

Correct answer by
Level 5

Scott is right. You have to use Oauth to get authenticated with twitter API to get JSON feed. We ended up using https://code.google.com/p/oauth-signpost/ to establish that connection. Hope it will help.

Yogesh

View solution in original post

7 Replies

Avatar

Level 10

This community article was updated to use the new Twitter feed:

[img]Widget2.png[/img]

See: http://scottsdigitalcommunity.blogspot.ca/2013/02/creating-aem-feed-components-that.html

Avatar

Former Community Member

Hi Scott,

I looked at your article, however, our requirement is to import the clients tweets, continuously, and store them in the JCR.  Basically, the exact functionality of the Feed Importer, just with a Feed Type = JSON.  Will Adobe be adding such a Feed Type?  If not, could I add it to my AEM instance?  If not, how would I develop a custom JSON importer, that stores the imported data into the JCR?

Thanks.

 

Avatar

Level 10

Twitter updated the API last Spring -  around April 2013 or so.

We used to be able to hook into the feed - but the API change that Twitter made (I think for security and to block unauthenticated access) prevented that.

See:

https://dev.twitter.com/discussions/18496

Avatar

Level 10

You can use JSON with Twitter:

https://dev.twitter.com/docs/api/1.1/overview

But now -- you need to authenticate using OAuth:

Authentication required on all endpoints

In version 1.1, we're requiring applications to authenticate all of their requests with OAuth 1.0a or Application-only authentication. Not only will this visibility allow us to prevent abusive behavior, but it will also help us to further understand how categories of applications are using the API. We'll apply that understanding to better meet the needs of developers as we continue to evolve the platform. At this time, all authentication requires user context, but in the coming weeks we'll be pushing out support for a form of authentication not requiring a user context.

So you can use the widget code without using OAuth or use OAuth to get JSON feeds.

Avatar

Former Community Member

Yeah, I'm aware of their new requirements since the API update this past Spring.

Thanks for the info.  I'll have to figure something out.

Avatar

Correct answer by
Level 5

Scott is right. You have to use Oauth to get authenticated with twitter API to get JSON feed. We ended up using https://code.google.com/p/oauth-signpost/ to establish that connection. Hope it will help.

Yogesh

Avatar

Employee

FYI - the next version of ACS AEM Commons will have a easy way to instantiate a Twitter API client (using the Twitter4J library) from a Twitter Connect cloud service configuration or a page on a site which is configured with a Twitter Connect configuration.

The work-in-progress documentation can be seen at https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/gh-pages/_drafts/2013-10-10-twitte...