MyBB Community Forums

Full Version: [MyCode] Instagram post with text
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone,
I would like to incorporate Instagram (and the text) posts and for now I have only found this code:

\[insta\]https://www.instagram.com/p/(.*?)/\[/insta\]


... which replaces this code.

<div style="text-align:center">
<iframe src="//instagram.com/p/$1/embed/" style=" color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;" align="center" width="612" height="710" frameborder="0" scrolling="auto" allowtransparency="true" style="border: 1px #b2a998 solid; border-radius: 5px; box-shadow: 0px 0px 7px 0px rgba(106, 101, 91, 0.5); " text-align:center; text-decoration:none; width:100%;" target="_blank"> 
</iframe></div>

Unfortunately I only see the image and not the attached text. How could I embed that too (always using a MyCode that I find very useful) ???

MyBB version: 1.8.12

Thank you all
Matteo
No one? Sad
btw, the trouble is not the code, but the url used in the iframe.
Try using as replacement :
<iframe src="//api.instagram.com/oembed?url=http://instagr.am/p/$1/" style=" color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;" align="center" width="612" height="710" frameborder="0" scrolling="auto" allowtransparency="true" style="border: 1px #b2a998 solid; border-radius: 5px; box-shadow: 0px 0px 7px 0px rgba(106, 101, 91, 0.5); " text-align:center; text-decoration:none; width:100%;" target="_blank"> 
</iframe></div>
(2019-04-18, 09:34 AM)Crazycat Wrote: [ -> ]btw, the trouble is not the code, but the url used in the iframe.
Try using as replacement :
<iframe src="//api.instagram.com/oembed?url=http://instagr.am/p/$1/" style=" color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;" align="center" width="612" height="710" frameborder="0" scrolling="auto" allowtransparency="true" style="border: 1px #b2a998 solid; border-radius: 5px; box-shadow: 0px 0px 7px 0px rgba(106, 101, 91, 0.5); " text-align:center; text-decoration:none; width:100%;" target="_blank"> 
</iframe></div>

Does not work.
Adding with this code does not even display the image, but a connection error Big Grin
Sorry, I quickly rode the instagram api documentation.

Following https://www.instagram.com/developer/embedding/, it's not possible to do what you want with a simple MyCode, you need a plugin to retrieve and parse datas.
Oh, ok. And I, who have been trying for many days ahahahah
And there is a plugin for MyBB?
You can try plugins search or have a look in the plugin section of the forum.
Thanks Smile
(2019-04-01, 08:05 AM)matteo90 Wrote: [ -> ]Hi everyone,
I would like to incorporate Instagram (and the text) posts and for now I have only found this code:

\[insta\]https://www.instagram.com/p/(.*?)/\[/insta\]


... which replaces this code.

<div style="text-align:center">
<iframe src="//instagram.com/p/$1/embed/" style=" color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;" align="center" width="612" height="710" frameborder="0" scrolling="auto" allowtransparency="true" style="border: 1px #b2a998 solid; border-radius: 5px; box-shadow: 0px 0px 7px 0px rgba(106, 101, 91, 0.5); " text-align:center; text-decoration:none; width:100%;" target="_blank"> 
</iframe></div>

Unfortunately I only see the image and not the attached text. How could I embed that too (always using a MyCode that I find very useful) ???

MyBB version: 1.8.12

Thank you all
Matteo
This is useful !
So is there an official plug-in to embed Instagram?