Generate interactive images on Facebook posts - ruby-on-rails

I'm looking into expanding our product line by allowing dynamic images as a graph api post via facebook. I was looking at making dynamic images (something like: http://mashable.com/2013/04/23/thinglink-facebook/#sceLSDRqmkqQ). Is there a way to make a dynamic image on the facebook wall?
I don't know if that makes any sense, but I was just wondering how ThingLink creates those kinds of interactive images when it looks like Graph just allows static images.
Thanks!

Related

Microsoft OneNote Graph API page creation with background

I am using the Microsoft one-note graph API for creating pages according to their demand in HTML.
Is there any possibility to create a page with a background image? Because I would like to use it as the background of a fillable form.
I should be filled by handwriting with a pen on a tablet in the OneNote app.
Or are there any other, better approaches?
You can definitely create pages - see this link.
The background can be an image or pdf. I however much prefer to use a template page that you create yourself (directly in one note) and copy using page: copyToSection. This allows you to use the added functionality of onenote such as ruled pages, setting images as backgrounds, etc.

Generating Images from maps

How do you capture an image of a user generated map, like one created using Leaflet.js?
Here is my example:
I have a website that generates a map.
I want to save an image of that map
e.g. when the user shares their profile, the preview image is of their map.
I know facebook, Strava, and most other services show images of a user map in their news feeds instead of showing interactive maps.
The problem
The map is generated client side, so grabbing an image of the map serverside isn't possible
Possible Solution
Once a map is generated, use PhantomJS to capture a screenshot of the map, and crop out the rest of the website.
Question
Since this is such a common thing to do, is anyone aware of a better or more standard way of grabbing these screenshots? I've seen things like the mapbox static API, but that doesn't capture the custom pins and line features on my maps.
I'm using rails for the back end.
You can make your map to be able to read the url params and set its state from it. When the user changes something on the map, the map's state is saved as url parameters and then send it/store it on the server for PhantomJS to generate it.
E.g.
&coords=123.123,10.123,54.54,45.11&zoom_level=5&....

Slack Slash Command - inline image attachments

I'm making a cribbage app for our slack channel. It's played using Slash commands. I'm currently showing the player their hand when they type the /showHand command, and it works, but I'd really like to be able to inline the image attachments but I cannot find a way to do this. Currently, it looks like this:
And if I use thumbnails it looks like this:
Is there a better approach? Possibly a way to add multiple images to one attachment? Possibly a display option to display response attachments inline?
UPDATE:
I followed Szymon Roziewski's advice and created a server-side module to download the card images I needed and create the final image of the player's hand. The images are cached so they only need to be downloaded once during the lifetime of the dyno.
I also contacted Slack support and I was told that inlining image attachments isn't currently possible but they might make it a future feature.

Is is possible to share elements or parts of a page on social media sites?

I'm hoping this is a pretty simple question to answer. I have a page with 6 recipes on it. I'm being asked to include share buttons for each recipe and they want the shares on FB or Twitter to be formatted to use a specific image and text for each recipe. This is something we would normally handle via Open Graph metatags and the like, but that only works at the page-level.
You must use a separate URL/page for each Like/Share. But you can redirect to the main page, or just use a GET parameter. For example, each Like/Share Button can use the following URL: http://www.yourdomain.com/yourrecipepage.php?recipeid=x
The "x" being dynamic, of course. Now you can check the recipeid parameter and use different OG tags. the rest of the page will be the same. I hope you understand what i mean :)

How to get images from instagram with multiple hashtags?

In my iPhone app, I am trying to get images from INSTAGRAM with multiple HASHTAGS. I can able to get images with a single hashtag using following url :
https://api.instagram.com/v1/tags/CRICKET/media/recent?client_id=API_KEY.
Is there any way to get images with multiple hashtags like CRICKET, FOOTBALL at a time instead of making two calls.
Or Is there any out side API's avialble with this feature?
Please help me in this requirements.
Thanks in Advance.
I'm going to say no. An API spec is entirely up to the company that owns the website (Instagram). So in order to query two tags, they would have to build that into their server as a feature.
You could create your own intermediary server that your iOS app connects to, however, if you really want just one API call on the iOS device.
iOS -> Your server -> makes two calls, one for each tag -> Instagram's server

Resources