Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[MyCode] Instagram post with text
#1
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
Reply
#2
No one? Sad
Reply
#3
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>
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply
#4
(04-18-2019, 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
Reply
#5
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.
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply
#6
Oh, ok. And I, who have been trying for many days ahahahah
And there is a plugin for MyBB?
Reply
#7
You can try plugins search or have a look in the plugin section of the forum.
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply
#8
Thanks Smile
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)