We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • 3
[ C ] Embedding a tweet/instagram post
Topic Started: Dec 23 2014, 05:18 PM (2,289 Views)
slothly
Member
[ * ]
Would it be possible to embed a tweet/instagram picture in a post?

Here's what it would look like:

Twitter:
Posted Image

Instagram:
Posted Image

The developers of twitter have a documentation on embedding tweets which might be useful: https://dev.twitter.com/web/embedded-tweets

Likewise for instagram: http://blog.instagram.com/post/55095847329/introducing-instagram-web-embeds

And would it also be possible to simply post the link to the tweet/instagram and have it automatically embedded in the post? Similar to Cory's code on automatically embedding youtube videos with no BBcode (http://support.zathyus.com/topic/5153430/)

I think this would be a great addition for a forum so if anyone could help out here, it would be deeply appreciated. Thanks for your help guys.
Edited by slothly, Dec 23 2014, 05:23 PM.
Offline Profile Goto Top
 
Replies:
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Can you post a status URL that contains an image that is doing this so I can see for myself? It's probably because the image is being re-sized, which causes distortion.
Offline Profile Goto Top
 
extraordinary
Member
[ *  * ]
Cory
Jan 14 2015, 01:02 AM
Can you post a status URL that contains an image that is doing this so I can see for myself? It's probably because the image is being re-sized, which causes distortion.
But it shouldn't re-size to the point where it is beyond pixelated. Because even in Tweetdeck or the preview it doesn't look as pixelated as it does in the coding.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Can I see the status URL, please? If you want to keep it private then PM it to me.
Offline Profile Goto Top
 
slothly
Member
[ * ]
Cory
Dec 31 2014, 12:00 AM
See what using just this does:
Code:
 
<script type="text/javascript">
//<![CDATA[
$('td:contains([twitter=):not(:has(textarea)), div.search_results:contains([twitter=)').each(function () {
$(this).html($(this).html().replace(/\[twitter=(.+?)\]/gi, '<blockquote class="twitter-tweet"><a href="https://twitter.com/$1"></a></blockquote>'));
});
//]]>
</script>

<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
This works beautifully on my board and I also found your instagram embedded code in the Closed Requests section.

Thank you for you help!
Edited by slothly, Jan 16 2015, 07:02 PM.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
You're welcome, and don't forget that the code was updated again to add the BBCode button in this post.
Offline Profile Goto Top
 
Helena
Member Avatar
M is for Mod

Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 3