Is there any way to share images with description using Google+ public api?
For facebook I use
FB.api('me/images', 'post', {
message: 'My description - http://www.mywebsite.com/mypage',
url: 'http://www.mywebsite.com/path/to/my/image.jpg'
}, function (r) {
alert('SUCCESS');
});
For Google+, I juste have
https://plus.google.com/share?url=https://www.mywebsite.com/mypage
but this just gives a small capture of the image with the information contained in the open graph tags. I want something that gives the same result as if you clic on "Photos" on Google+ and then drag & drop an image then add a description.
Thanks,
Related
I am using react-native-photos-framework for creating user defined album and creating assets into device native gallery.
In my app I gives an user defined album creation functionality to user. For that I am displaying a simple modal with input field where user can type album name and 'OK' and 'CANCLE' button.
What I want ?
I want that when user click on 'OK' button after typing album name in input field, a typed album should be created in gallery and one by default image (which is in my local directory) should added to that album.
Here is the code that i used :
createAlbum() {
RNPhotosFramework.createAlbum(this.state.createAlbumName).then((album) => {
RCTCameraRollRNPhotosFrameworkManager.createAssets({
images : [{ uri : '../assets/logo.png' }],
album : album,
includeMetadata : true
});
}).catch((error)=>{
alert("Error in creating album : \n"+JSON.stringify(error));
});
}
As you can see, I am first creating album which is creating successfully in gallery, But assets is not copying in that album. It is giving me this error :
Could not find image file:///Users/vision/Library/Developer/CoreSimulator/Devices/E5AA1780-A55C-4C67-95A5-222E4AS3PA23/data/Containers/Bundle/Application/5E37FAF5-15DD-483B-3BD6-C311C587SD8/CameraApp.app/../assets/imgs/logo.png
I have also used require() to get image uri as follow :
images : [{ uri : require('../assets/logo.png' )}],
but then app will crash.
Here is the my project structure :
Please help me how I can create asset of local static image using react-native-photos-framework. I am new to react native !!!
If anyone also running in this problem I have solved problem using this answer.
To solve the problem first install react-native-fs.
Then import it in your project.
const RNFS = require('react-native-fs');
Then I used RNFS.MainBundlePath to get my app root path and add assets before my actual path.
Here is code :
createAlbum() {
RNPhotosFramework.createAlbum(this.state.createAlbumName).then((album) => {
RCTCameraRollRNPhotosFrameworkManager.createAssets({
images : [{uri:RNFS.MainBundlePath+'assets/src/assets/imgs/logo.png'}],
album : album,
includeMetadata : true
}).then((result)=>{
alert(JSON.stringify(result));
}).catch((error)=>{
alert("Error in creating assets.\n"+JSON.stringify(error));
});
});
}
Hope it will help someone.
I am trying to implement ActionSheetIOS.showShareActionSheetWithOptions, I am passing the correct url which might be a link to an image or a file(pdf/msword).
I want to provide an option to Print the file or Save Image file when the user clicks on the Share button. But I only see the following options
"Add to reading list", "Copy" and more
Here's my code:
ActionSheetIOS.showShareActionSheetWithOptions({
url: route.passProps.url,
},
(error) => alert(error),
(success, method) => { }
);
I have verified that the url is correct.
When visiting a url, Safari does provide you an option to Print/Save, so I know its possible, but I don't know how.
I made a template with an editable image ("Editable Content Area"), like so:
<img src="http://somewhere.com/foo.jpg" mc:edit="header_image">
When making a new campaign I can replace the image while using the MailChimp editor. But I don't seem to be able to replace the image using the API.
If I include the URL to the image as the section content, it seems to be ignored and the campaign is created without the new image url being set.
content: {
sections: {
header_image: "http://somewhere/else/bar.jpg",
header: "Our latest newsletter",
body: "<p>My fabulous content</p>",
... other named mc:edit section content ...
}
}
All other editable sections (text) are being properly replaced.
Question: How can I set the url of an mc:edit tagged image via the campaigns/create API?
Unfortunately editable content areas are not supported in the MailChimp API. The editable area was made for use within their own editors.
A workaround is to just have an editable content area and to put a full image tag into it via the API.
For example;
content: {
sections: {
header_image: "<img src='http://somewhere.com/foo.jpg'>",
header: "Our latest newsletter",
body: "<p>My fabulous content</p>",
... other named mc:edit section content ...
}
}
I have success with the post using the below code example. But, the photo is not displayed "inline" on the post. Instead, it is shown as an attachment (paperclip) which, when clicked, opens the image.
FB.api('/page_id/photos', 'post',
{ message: 'the message', url: 'http://www.mysite.com/myimage.jpg' },
function(response) { });
Does anyone know of a way, with the JS SDK, to post a photo inline?
I work on a facebook-like social network and would need to extract the mp4 from an Instagram link.
For photos it was easy:
url_shared = "http://instagram.com/p/a69ygTTHKq/"
photo_to_embed = url_shared+"?size=t"
Do you know anything similar to find out a direct link to the mp4? I tried using their API and changing the extension from ".jpg" to ".mp4" but failed as it doesn't work all the time.
For example:
http://api.instagram.com/oembed?url=http://instagram.com/p/bCgbJ2pgCi/ returns
{
provider_url: "http://instagram.com/",
media_id: "487094313204187298_9762431",
title: "So did you download our "Hockey Community" app yet? If you like hockey even just a bit you should do it now!!'",
url: "http://distilleryimage2.ak.instagram.com/d79af376deb011e2922a22000a1fdc29_7.jpg",
author_name: "hockeycommunity",
height: 612,
width: 612,
version: "1.0",
author_url: "http://instagram.com/hockeycommunity",
author_id: 9762431,
type: "photo",
provider_name: "Instagram"
}
data.url = "http://distilleryimage2.ak.instagram.com/d79af376deb011e2922a22000a1fdc29_7.jpg" and the video link is actually "http://distilleryimage2.ak.instagram.com/d79af376deb011e2922a22000a1fdc29_101.mp4"
Only the end of the filename changes but can't figure out what's the rule...
Source:
http://instagram-engineering.tumblr.com/post/53880734833/moving-pictures-capturing-moments-with-video
http://instagram.com/developer/embedding/