Embedding tweets into a storymap

1010
8
Jump to solution
01-07-2019 07:04 AM
DanielleRDC
New Contributor

Hi, the storymap template i am using requires that i edit the JSON code directly in order to do so. 

I however seem to be having issues doing this - i have follow help pages and just used the same code used in the example (so i know it works before i try and embed my own)but the editor is throwing up an error says

"expected ',' instead of 'h'

the code I'm using is:

{
"type": "text",
"text": {
"value": "<p><iframe border=0 frameborder=0 height=250 width=550
src="https://twitframe.com/show?url=https%3A%2F%2Ftwitter.com%2Fjack%2Fstatus%2F20"></iframe></p>
}

i don't understand why its not working when i've just copy and pasted from the example.

Am i also right in thinking i am unable to embed the whole feed, only select tweets in this way?

can you help?

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi there, sorry this has been so problematic for you! Here is the snippet you need to insert into the JSON:

{
"type": "webpage",
"webpage": {
"type": "webpage",
"url": "https://twitframe.com/show?url=https://twitter.com/EsriStoryMaps/status/915618221780123648",
"height": 550,
"options": {
"interaction": "enabled",
"size": "small"
},
"caption": ""
}
},

I've also included a screenshot of what it looks like in the JSON editor. I tested this myself a few minutes ago and can confirm it's working for me. If copying and pasting the code still isn't working, I'd suggest you double check anywhere you have a single quotation mark in the code snippet. I've noticed that sometimes when I paste in code, those single quotes don't format properly, and I sometimes have to delete the pasted version and type in a new single quote. 

If you're still having problems let me know—I'd be happy to hop on a call and help you troubleshoot this further! 

View solution in original post

0 Kudos
8 Replies
DanielleRDC
New Contributor

Does only a community of users see these questions or do ESRI staff see them too? Is there another way to get help?

0 Kudos
DanielleRDC
New Contributor

So i guess that's a no then - where do i log calls to get help from Esri directly?

0 Kudos
OwenGeo
Esri Notable Contributor

Hi Danielle -- You can just paste your <iframe> code into the Story Map Builder that you are using to embed a tweet. Just look for the "web page" or "link to content" option.

For example, below is a screenshot of your tween inside a Cascade story... I'd recommend using SMALL for the size and enabling interaction in the Appearance tab of the media config options.

You can also edit the height of the embed if you want. See the section on "Better sizing of embedded content" in this blog post.

I'm curious why you mentioned you needed to edit the JSON of your story directly to do this?

Owen Evans
Lead Product Engineer | StoryMaps
0 Kudos
DanielleRDC
New Contributor

when i tried the above method it did not work, (just a blank box with a broken link/face icon) and when trying to find out why - the online guidance said it was because some of the templates you had to edit the json code - the last bit of text on this page

Embed Tweets in your Story Map Journal in 5 Easy Steps 

as following the '5 easy steps' didnt work - i followed the instructions to use json instead (as the article says thats why it wont work) - which, as mentioned, didn't work either. Is that not meant to be the case?

is it also correct that you can only embed single tweets, not feeds?

0 Kudos
by Anonymous User
Not applicable

Hi there, sorry this has been so problematic for you! Here is the snippet you need to insert into the JSON:

{
"type": "webpage",
"webpage": {
"type": "webpage",
"url": "https://twitframe.com/show?url=https://twitter.com/EsriStoryMaps/status/915618221780123648",
"height": 550,
"options": {
"interaction": "enabled",
"size": "small"
},
"caption": ""
}
},

I've also included a screenshot of what it looks like in the JSON editor. I tested this myself a few minutes ago and can confirm it's working for me. If copying and pasting the code still isn't working, I'd suggest you double check anywhere you have a single quotation mark in the code snippet. I've noticed that sometimes when I paste in code, those single quotes don't format properly, and I sometimes have to delete the pasted version and type in a new single quote. 

If you're still having problems let me know—I'd be happy to hop on a call and help you troubleshoot this further! 

0 Kudos
by Anonymous User
Not applicable

Also, yes you're correct, this solution only works for individual tweets, not entire feeds.

0 Kudos
DanielleRDC
New Contributor

hi Hannah - thank you for your kind assistance. I will give the above ago and hopefully have more luck

thanks!

0 Kudos
IngridMans
Occasional Contributor II

So, are there any options for embedding entire twitter timeline feeds? I would like to embed one in a tabbed storymap built on our Portal. 

0 Kudos