SocialSharing PhoneGap Plugin do not share URL parameters on FB wall - facebook

I am using SocialSharing-PhoneGap-Plugin
var url = 'http://myweb.com?name=shareGroup&invitekey='+key+'&grpId='+grpId;
window.plugins.socialsharing.share('Hey there! download this app, its amazing.', null, null,url, function(){
alert("LINK: "+url);
},function(){});
Here url parameters is not sharing on FB. On FB wall when i click the shared link it redirect to http://myweb.com rather than http://myweb.com?name=shareGroup&invitekey=XXX&grpId=YYY. Here inside alert it shows correct url.
I have tried with encoding url using encodeURI but same result.

Related

URL Scheme facebook page post

How do I use the url scheme to facebook from a link in the mobile browser open the facebook app on a specific post of a page?
In href tried using:
fb://page/"id" - opens the page correctly
tried using fb://post/"id_post" - does not work, just open the facebook app

Facebook: sharing SWF on the web via URL redirection doesn't work well

I'm using URL Redirection method to share SWF to FB. Here's documentation https://developers.facebook.com/docs/reference/dialogs/feed/ URL Redirection section. I pass app_id, caption, link, description, source and picture params. It used to work sometime ago but now doesn't. I whitelisted IP of application server in FB application settings but it doesn't help. My SWF is located under HTTPS. I compared params when YouTube does the same kind of sharing with mine, try diff order of params. Nothing.
From a website I have link to https://www.facebook.com/dialog/feed?app_id=140513466110452&link=https%3A%2F%2Fmenyou.com%2Fcollections%2F505694-rihanna-unapologetic&display=popup&&name=Unapologetic&caption=Unapologetic&description=some&picture=https%3A%2F%2Fmenyou.com%2Finprodicon_cover%3Ficpn%3D00602537246861%26width%3D200&source=https%3A%2F%2Fmenyou.com%2Fassets%2Fwidget%2Fplayer.swf%3Fdomain%3Dmenyou.com%26collectionID%3D505694&ref=share&redirect_uri=https%3A%2F%2Fmenyou.com%2Ffacebook%2Fredirect_uri (link is working, app_id is correct, so you could try. For me everything matches docs. It used to work) when user is following that link, he see share dialog and is able to post, everything seems to be fine. It posts to timeline of currently logged user in FB as expected.
When I go to my news feed in FB I see only caption and description ( i.stack.imgur.com/dstg7.png ) (no preview image with "play" button on it like SWF usually has). When I go to my profile in FB and follow "comment" link there ( i.stack.imgur.com/TO6iX.png ), popup appears with preview image and with "play" button. SWF works correctly there but not in the "news feed" section of FB

Facebook Open Graph Object Link to Facebook App

I'm building a Facebook canvas app which makes use of Open Graph. So for example the app pulls in content from http://www.mysite.com/ Say the action posted to the timeline as "Duncan completed MyObject on My App"
Clicking My App opens the app page on Facebook. However clicking the MyObject link opens the actual page where all my meta data is added outside of Facebook www.mysite.com
I really just want both links to open the app in Facebook. Am I missing a trick here or is my only solution to perform a redirect or something?
I understand I need to get Facebook to parse mysite.com in order to grab meta data. However, setting the og:url to the url of my app doesn't make a difference.
I was having the same issue. I ended up making a separate .jsp file which writes all the og: tags in the page, and in the body it only contains:
<script>
location.href = "<%=redirectUrl%>";
</script>
The redirectUrl variable is a String I calculate from the original requested URL, it is like "http://apps.facebook.com/xxxyyy?myParam=zzz". Of course it can be anything, and in PHP or whatever language you use.
When you post an action to Open Graph, use the page with the redirect as the object URL. Facebook will parse the og tags nicely, and when an actual browser reads the page, it will redirect the user to your Facebook app.
I had the same problem, not sure if I was missing something really obvious.
I had a PHP file that followed the example file from Facebook. But when clicking the object on the timeline story, I noticed the following GET parameter: fb_source=timeline_og
So to solve the redirecting issue, I put the following at the top of the file, just inside the PHP tags:
<?php
if ($_GET['fb_source'] == 'timeline_og') {
// clicked on link in timeline, so redirect to required URL
header('Location: REDIRECT_URL_HERE');
}
(Obviously, replace REDIRECT_URL_HERE with whatever URL you wish to redirect to.)
Hopefully someone will find this useful!

Why does facebook change the url when I click on a link?

Suppose that I click on a facebook link -- once clicked, the URL is transformed to this:
http://www.facebook.com/l.php?u=http%3A%2F%2Fapple.stackexchange.com%2Fquestions%2F398%2Fhow-do-i-build-apps-to-my-jailbroken-ipad&h=uAQFM5WKt
And then I'm redirected to the URL I thought I was going to. Why does facebook do this?
Facebook keeps track of all the links fired from its website. It saves the url you provided as link.
First it forwards you to a facebook link where it saves the url and then it redirects to the actual url.
This way facebook knows which urls are getting most hits.
FYI, Even google does it.

How to get the header URL of a Facebook fan page?

I'm developing a Facebook app and I need to get the URL of the page where the app is installed to set their share buttons and other params.
Thanks!
Take the page id from the signed request (http://developers.facebook.com/docs/authentication/signed_request/) and then call /PAGEID?fields=link and pull out the link value. This would be the url.