i am using codova 2.9.0. i give option to sharing video and image in facebook via cordova facebook connect plugin. Shared successfully. but when i click video in facebook page i got this error
Sorry, the application you were using is misconfigured. Please try again later.
and it have two buttons Go Home and Find Another App
this is my code:
FB.ui({
method: 'feed',
name: '',
caption: '',
description: des,
link: 'http://apps.facebook.com/mobile-start/',
source: postimage,
picture: url,
actions: [{ name: 'Get Started', link: 'http://apps.facebook.com/mobile-start/' }],
},
function(response) {
console.log('publishStory UI response: ', response);
});
what i missing?
I have found the solution Here
What you need to do is
The first line is a modification of the HTML head tag. This is required in your page for either active or passive sharing.
The first meta tag, shown in bold, is required for passive sharing, because you must have a Facebook app for passive sharing, as detailed in Passive App Setup.
Highlighted in italics are values that you must supply to this template.
So meta tag code will be like
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# video: http://ogp.me/ns/video#">
<!-- The following tag is required for passive sharing -->
<meta property="fb:app_id" content="yourFacebookAppIdHere" />
<meta property="og:type" content="video.other" />
<meta property="og:title" content="yourTitleHere" />
<meta property="og:description" content="yourDescriptionHere" />
<meta property="og:url" content="yourURLwithTheEmbeddedVideo">
<meta property="og:image" content="yourImageUrlHere"/>
<meta property="og:video" content="yourUrlHere" />
<meta property="og:video:secure_url" content="yourSecureUrlHere" />
<meta property="og:video" content="http://player.ooyala.com/player.swf?embedCode=YourOoyalaEmbedCodeHere&keepEmbedCode=true" />
<meta property="og:video:secure_url” content="https://player.ooyala.com/player.swf?embedCode=YourOoyalaEmbedCodeHere&keepEmbedCode=true" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
Related
How to share icon,text,url of the app as shown in the above image? Icon should be sent from drawable, I have tried all the shareintents.putExtras() and etc.. nothing is working for me.
Short answer: This isn't your job, it's the shared-to app's job.
Explanation: Facebook created a protocol called Open Graph, which apps like Facebook and Whatsapp use to get info about the what image to be displayed and what text to show.
To be able to have something like your included picture, you'd have to first own the website you are sharing links to, then you'd have to include this meta data in your html:
<html prefix="og: http://ogp.me/ns#">
<head>
<meta property="og:title" content="Text to be displayed." />
<meta property="og:type" content="video.movie" />
<meta property="og:url" content="Possibly a deep link to your app." />
<meta property="og:image" content="Image to be displayed."
/>
...
</head>
...
</html>
Finally in your android app you have to share a link to this website, possibly deep-linking into your app.
I am trying to post a link to FB in Unity using the FB SDK.
First I used the example given
FB.FeedShare(
null,
new Uri("https://developers.facebook.com/"),
"title",
"caption",
"description",
new Uri("https://imgur.com/a/IUwesX7"),
null,
HandleResult);
This works perfectly - link gets posted and has a preview picture (take from the first link). In fact, the link works so well that clicking on the pic opens MY app even though the page has no meta tags pointing to my app! How does that happen?
However, when I replace the links with my own it doesn't work:
FB.FeedShare(
null,
new Uri("http://anykey.co.il/deeplinks/duckduckduck.html/"),
"title",
"caption",
"description",
new Uri("http://anykey.co.il/deeplinks/feature.png"),
null,
HandleResult);
The link works ok but I don't get a preview picture. I get a placeholder with the name of my site. The placeholder is clickable and opens my app on my device but there is no pic
This is my html:
<!DOCTYPE html>
<HTML xmlns="http://www.w3.org/1999/xhtml"
xmlns:fb="http://ogp.me/ns/fb#">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE></TITLE>
<meta property="al:android:url" content="duckduckduck://story/1234">
<meta property="al:android:package" content="il.co.anykey.games.duckgames.duckduckduck">
<meta property="al:android:app_name" content="DuckDuckDuck">
<meta property="og:title" content="Duck Duck Duck" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://static.xx.fbcdn.net/rsrc.php/v3/ye/r/lWB96Z8sFtt.png" />
<STYLE TYPE="text/css">
body{font-family:Verdana,Geneva,sans-serif;font-size:16px;line-height:1.4em;color:#333;background-color:White;}
</STYLE>
</HEAD>
<BODY>
<A><IMG SRC="feature.png"></A>
<H1></H1>
<HR>
</BODY>
</HTML>
This is what I see when posting from my app:
Even stranger, if I copy the HTML from the FB link and put it on my site I get no picture.
What am I missing here? Does my website need to be authorised or something?
After burning many hours it turned out that removing the "/" from the end of my Url solved the problem.
Not sure why that is but now it is all working well.
I've implemented the facebook "Use App" button on the facebook page and I'm trying to redirect the user to the appstore link or the playstore link depending on the User's device.
But I get blank page instead of taking me the playstore when I open it on my android device. How can I get it to open respective app stores when I click on "Use app" button?
My code:
<!DOCTYPE html>
<html>
<head>
<meta property="og:image" content="example.png" />
<meta property="al:ios:url" content="myapplication://" />
<meta property="al:ios:app_store_id" content="11" />
<meta property="al:ios:app_name" content="myapp" />
<meta property="al:android:url" content="myapplication://?U=">
<meta property="al:android:package" content="com.myapp.myapp">
<meta property="al:android:app_name" content="myapp">
<meta property="og:title" content="myapp" />
<meta property="og:type" content="website" />
<meta property="al:web:should_fallback" content="false" />
</head><body>
</body></html>
I am developing a game app. And I am sharing facebook custom stories in my app.I have created a self hosted object(html page).
I want to use that same self hosted object in android,ios and Facebook canvas app.
I have already done custom story sharing without using self hosted object for android app and below is my code for the same
OpenGraphObject objProperty = OpenGraphObject.Factory.createForPost("namespace:level");
objProperty.setProperty("title","Title");
objProperty.setProperty("image","http://www.example.com/jokedemo/image/wrong.jpg");
objProperty.setProperty("url", "http://www.example.com");
objProperty.setProperty("description", "Can you beat me?");
OpenGraphAction action = GraphObject.Factory.create(OpenGraphAction.class);
action.setProperty("level", objProperty);
FacebookDialog shareDialog = new FacebookDialog.OpenGraphActionDialogBuilder(FBActivity.this, action,"namespace:unlock", "level").build();
where unlock is my action and level is my object.
But I want it to do using self hosted object that I have created so that I can use same object for all platforms (Android, IOS , Web).
In documentation it is mentioned that Self-Hosted Objects are more useful for multi platform app than using Object api.
I followed this https://developers.facebook.com/docs/opengraph/using-objects/#selfhosted document but couldn't found anywhere there how to use it on Android.
My code for creating an self hosted object (html page)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta property="fb:app_id" content="*************" />
<meta property="og:type" content="namespace:level" />
<meta property="og:title" content="Title" />
<meta property="og:url" content="https://example.com/namespace/level.html" />
<meta property="og:description" content="Can you beat me?" />
<meta property="og:image" content="https://example.com/namespace/image/abc.png" />
</head>
<body>
</body>
</html>
If I want to use self hosted object in my Android what will be the changes in my working code or I have to do it in another way ?
Any suggestion will be highly appreciated, Thank you in advance.
Finally I solved it , actually method was there in the document itself , but it wasn't specifically mentioned there that this code will be used for self hosted object.
Below is my code :
OpenGraphAction action = GraphObject.Factory.create(OpenGraphAction.class);
action.setProperty("level","https://example.com/namespace/level.html"); //here "level" is the Object name and url is the self hosted object
action.setType("namespace:unlock"); //"unlock" is the Action name
FacebookDialog shareDialog = new FacebookDialog.OpenGraphActionDialogBuilder(FBActivity.this, action, "level").build();
There is an example of using a URL (self hosted object) in the FB docs. Although they now refer to it as an app owned object. Just about to test it.
https://developers.facebook.com/docs/ios/ui-controls#share-appownedobjects
I tried Robs solution on Playing back an embedded mp4 video in a Facebook like or share using Flash but the video still could not play inline in facebook wall... If i change "og:video" to youtube or vimeo, it works perfectly... Can anyone figure this out? Thanks alot!
<meta property="og:site_name" content="video system" /><meta property="og:url" content="http://video.system.com?video_id=11111" />
<meta property="og:title" content="the video title" />
<meta property="og:image" content="http://video.system.com/11111.jpg" />
<meta property="og:description" content="the video description" />
<meta property="og:type" content="video" />
<meta property="og:video" content="https://app.system.com/StrobeMediaPlayback.swf?flashvars=&src=https://app.system.com/11111.mp4" />
<meta property="og:video:secure_url" content="https://app.system.com/StrobeMediaPlayback.swf?flashvars=&src=https://app.system.com/11111.mp4" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
<meta property="og:video:width" content="320" />
<meta property="og:video:height" content="180" />
Try changing your og:video:type to "video/mp4"
<meta property="og:video:type" content="video/mp4" data-content-type="dynamic">
Reference- somewhere on this page: https://developers.facebook.com/docs/opengraph/creating-custom-stories#propertytypes