In my application I use Pusher in order to publish content in realtime.
Recently I added Instagram content, which is published also via Pusher. It means that without reloading the page, an Instagram entry might appear.
I use the embed code Instagram supplies:
<blockquote class="instagram-media" .....
:
:
Usually there is no problem. But from time to time I get the content without the image, and instead a gray camera icon:
When I refresh page, usually I can see the photo.
Looking for some hint in console, this is what I got under Network tab:
Any idea?
Related
I'm trying to implement some features inside a web view in facebook messenger. on the phone the webview is opening fine, but in desctop web browser the webview is opening inside a new tab.
im using the following feature:
buttons:[{
type: "web_url",
url: "https://www.oculus.com/en-us/rift/",
title: "Open Web URL",
webview_height_ratio: "compact",
messenger_extensions: true,
}
I know that maybe it is supposed to open like this but you all can agree that if I'm implementing a custom feature inside the conversation it would be mach better to open it inside a small webview in the conversation.
does anyone knows if this even possible?
You have to follow the steps in these docs.
Make sure to read the docs for desktop and add the X-Frame-Options header. The troubleshooting section in the same docs is your friend.
Two caveats:
X-Frame-Options header does not seem to be enough for firefox. I'm in the process of building a bot using webview, and when I figure out which headers to send to make firefox work, I will post them here. EDIT due to some bugs within the platform on the web, I've postponed this project.
There seem to be a problem with getting page-scoped user ids on desktop. Read my question.
I'm tackling a problem relating to sharing on facebook, please help me do it.
In my app, a list of video, photo posted by my friends (facebook) appear and I want to add a share button for that. How can I do that?
I can implement a posting method for external picture (another website, not facebook) but only thumbnail will appear, and text doesn't appear like sharing on web browser (big picture, gray vertical line on the left).
the attached image is to represent for sharing post that I want.
Finally, after searching around and testing, I found the solution:
- use grapth api: me/feed
- possible parameters: message and link; link points to the page containing photo/video u want to share while message is your custom message.
I am developing an iOS app that uses the UIActivityViewController to share some text and a Url. In the Facebook and Twitter services it shows a thumbnail of the site located at the URL.
Unfortunately, the site in question does not look very good at all in the thumbnail. So currently the thumbnail has a negative value in the share dialog. I would either like to prevent the thumbnail from displaying, or supply my own image for the thumbnail. What is the best method to do this?
I would like to avoid having to create my own service and/or dialog.
I have tried adding an image to the item list, however that adds a bunch of services I don't want and adds the Image to the email action and adds the image to a photo album on facebook. The first problem I can get around by blacklisting actions I don't want. And I can make my own UIActivityItemProvider to stop the email problem. However, I have no idea how to prevent the facebook problem. (See How do I customize a UIActivityViewController to show a URL link when posting to facebook and twitter?).
Here is a screenshot of the facebook sharing dialog:
I'm attempting to embed a Youtube video on a user's wall using the Javascript API. I've poured over a bunch of different tutorials and came up with this:
var data = {
method: 'feed',
link: current_video_url, // Link to the vide on our site
source: current_video_src, // Link to the Youtube video, http://youtube.com/v/[hash]
picture: current_picture_url, // Thumbnail from youtube
title: current_video_title, // Title from our page
caption: current_video_description // Text from our page
}
FB.ui(data);
Running the Facebook Debugger shows that the current_video_url link is being properly parsed for OG tags and is available as an embedded video. I ran a debugger and all the variables are being properly set in the data variable.
This worked fine for about 2 days, and then we pushed the site live. We set up a new AppID in Facebook but now all the videos are just thumbnails instead of being embedded in the user's wall. I thought maybe this is a problem with the live site but now the dev site is broken too.
What's the best way to get this to work consistently?
When I add a link to a tweet in the TWTweetComposeViewController, I see the link attached correctly:
But unlike when I do so in Safari, the link doesn't show a preview of the URL like Safari (or Youtube) does:
Do you know if it's a hidden feature or if it depends on the Link added to the tweet?
Thank you!
This has been my experience as well, if you attach a URL the TWTweetComposeViewController will not automatically add a preview image.
I was curious so I took a look at the private runtime headers for Twitter.framework and I found a few interesting methods, including - (BOOL)addURL:(id)arg1 withPreviewImage:(id)arg2;. Using this in my app I found it worked exactly as expected, the tweet view showed a link along with the image I included. Unfortunately this doesn't help too much, since it's a private method your app will almost certainly be rejected if you try to use it in the App Store.