I am having an issue logging a "LIKE" for an application page. It seems that the like is not being inserted into the page_fan table. My concern is that I may be trying to LIKE the application page and not the actual page that contains the application as a tab. I have already written the LIKE code and the like does post to my wall etc. but when I perform the me() query against the page_fan table it does note return my uid.
I have tried the LIKE both within my custom page was well as the global LIKE above all canvas pages on FB page.
My question is: Should my code logic LIKE the ApplicationId(Canvas/iframe) or the PageId in which the Tab exists? Or I am totally off base with my logic.
Here is what I have developed and what I have found.
I have created applications that are accessible on the left hand side of a facebook page (tabs). These are canvas or iframe applications that generate a unique AppId when a new application is created.
For example, I am currently adding the AppId of a canvas page as an OG tag in same canvas iframe page.
I then access the following URL and select the page from an existing list that this tab should appear:
www.facebook.com/dialog/pagetab?app_id=111111111111111&display=popup&next=http://facebook.myapp.com/canvaspage.html
I wrote the following code to determine the page_id (for example this returned:222222222222222)
//App PageId
var url = 'https://graph.facebook.com/fql?q=SELECT url, id, type, site FROM object_url WHERE url="'+appURL+'"';
$.getJSON(url, function(data) {
$.each(data['data'], function(index, appPageId) {
if (appPageId) {
var appPageId = appPageId['id'];
}
});
});
<!-- Open Graph for the "PAGE" PagId that has a relationship to AppId (id:) below / I have found that this will include a likes variable if GT 0 -->
graph.facebook.com/222222222222222
{
"id": "222222222222222",
"name": "TEST APPLICATION",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-ash2/373257_225429330866626_1701496970_s.jpg",
"link": "http://apps.facebook.com/test-app/",
"app_id": 111111111111111, // Below ID - also the AppId
"category": "Website",
"description": "Test App Description",
"can_post": true
}
<!-- Open Graph for "APPLICATION" AppId --->
graph.facebook.com/111111111111111
{
"id": "111111111111111",
"name": "TEST APPLICATION",
"category": "Lifestyle",
"subcategory": "Food & Drink",
"link": "http://www.facebook.com/apps/application.php?id=111111111111111",
"canvas_name": "test-app",
"namespace": "test-app",
"icon_url": "http://static.ak.fbcdn.net/rsrc.php/v1/yT/r/4QVMqOjUhcd.gif",
"logo_url": "http://static.ak.fbcdn.net/rsrc.php/v1/yq/r/IobSBNz4FuT.gif",
"weekly_active_users": "2",
"monthly_active_users": "2"
}
Thanks in advance for your assistance.
You will want to like the Facebook page, not the app ID. Remember a facebook page can have many App Id's in it (what facebook calls Page tabs).
Related
Problem:
In my case what happening is, it is always saying Account Linking Failed
What I am doing
following this doc word by word: https://developers.facebook.com/docs/messenger-platform/identity/account-linking/
when I need user to be linked to my app, I send a login button to the user like this:
http.post(`https://graph.facebook.com/v2.6/me/messages?access_token=${PAGE_ACCESS_TOKEN}`, {
"recipient": {
"id": "2829343507138856"
},
"message": {
"attachment": {
"type": "template",
"payload": {
"template_type": "button",
"text": "Try the log in button!",
"buttons": [
{
"type": "account_link",
"url": "https://dev-sysborg.auth0.com/authorize?response_type=code&client_id=VYierFrTxMb1Kky3DfPEqUHXaShdmH43"
}
]
}
}
}
}).then(() => {
response.send("ok")
})
user see this login button like this on their messenger screen:
when user try to login by pressing the button, it pops up a new window and open login screen in that window:
and after entering credentials it redirects to a screen which says Account linking failed,
something like this:
I am sure there is nothing wrong with the Auth0 configuration because it is working fine with postman and connected very well with some other platforms
someone said I must have to subscribe to account linking event so I have subscribed to these three events: messages, messaging_postbacks, messaging_account_linking
I am Stuck at the end of the story,
Please help me out
After Recent Facebook changes
http://graph.facebook.com/" + facebookId + "/picture?type=square
is downloading image instead of displaying image.
https://graph.facebook.com/118844755560695/picture?type=large
Do an API request with one of the SDKs and you will get the following JSON:
{
"data": {
"is_silhouette": true,
"url": "https://static.xx.fbcdn.net/rsrc.php/v3/yL/r/HsTZSDw4avx.gif"
}
}
The url is what you can use for display.
[UPDATE] I checked this StackExchange out, but this does not work! It converts the typed in markup language into this question mark...
I manage a Facebook Page that deals with music videos, and I always link back to the original artist / group for discovery purposes (the reason for this question) and giving credit to them. However, I am having a difficult time with one link to a specific group.
The main Facebook Page title that I am trying to link to is 15&
Normally, in a post, you would type in #15& or #Stack Overflow, and you would select the correct item from the drop-down menu. As such...
However, that does not work because of the & at the end of the name. That stops me from linking to that page. There are no more suggestions in the drop-down to choose from.
However, I thought there was a workaround to this by linking through the ID, but I have not been able to figure it out.
Something like, #[PageID]. In my case, #[413447808702858]; however, this does not work!?
What is the workaround to doing this?
Here is the Facebook Graph for 15&, but I copy-pasted the text below.
{
"id": "413447808702858",
"about": "15& Official Facebook",
"band_members": "\ubc15\uc9c0\ubbfc (Jimin)\n\ubc31\uc608\ub9b0 (Yerin)",
"can_post": false,
"category": "Musician/band",
"checkins": 0,
"cover": {
"cover_id": 677497282297908,
"offset_x": 0,
"offset_y": 0,
"source": "https://fbcdn-sphotos-a-a.akamaihd.net/hphotos-ak-xpa1/t1.0-9/s720x720/10320593_677497282297908_5814182992929119023_n.jpg"
},
"has_added_app": false,
"is_community_page": false,
"is_published": true,
"likes": 151126,
"link": "https://www.facebook.com/15andOfficial",
"name": "15&",
"parking": {
"lot": 0,
"street": 0,
"valet": 0
},
"record_label": "JYP Entertainment",
"talking_about_count": 5017,
"username": "15andOfficial",
"website": "http://15and.jype.com, http://cafe.daum.net/15And, http://twitter.com/jypnation, http://www.youtube.com/jypentertainment",
"were_here_count": 0
}
You can type the page's username, this will give the exact page name with that username
the page username is 15andOfficial
I use a like button box_count style for several articles on my page and grab the like count via the Graph API for further use. The problem is the like button on my page says 7 likes, but when I enter the exact same URL into Graph API it does not list any likes at all.
This only happens to some of my articles, not all.
https://graph.facebook.com/?ids=http://www.example_url.de -> no shares/likes
(actually the API only lists the ID here, nothing else)
But http://www.example_url.de entered in the like Button tool says 7 likes.
How can that be? Thank you very much for your help!
The like button often represents more than just likes from a user click, it includes share count, send count, tagged count etc: so this number will often be different from the user like object count in graph api.
Shawn is right.
The insight document says...
Why does the count next to my Like Button not match what I see in Insights?
The count next to the Like Button represents the sum of Like Button clicks, News Feed likes, News Feed comments, and shares on Facebook.
You can check the real numbers by using FQL query below.
SELECT normalized_url, like_count, share_count, total_count, comment_count, commentsbox_count
FROM link_stat WHERE url ='URL'
[
{
"normalized_url": "URL",
"like_count": 64,
"share_count": 17,
"total_count": 83,
"comment_count": 2,
"commentsbox_count": 1
}
]
like_count indicates the number of likes and total_count is the number they are showing around the like button. Each fields are described here.
The like button on your page must be using a slightly different URL that you expect.
The domains http://www.example_url.de and http://www.example_url.de/ are different in facebook's eyes. Something as insignificant as a forward slash "/" on the end of urls can make all the difference.
I'm guessing that's the issue.
Ok, the numbers are differente, but there is still a problem.
I currently have a page that shows 119 likes on the button, FQL gives me:
{
"data": [
{
"normalized_url": "http://wesleydesouza.com.br/prefixo9/",
"like_count": 80,
"share_count": 23,
"total_count": 119,
"comment_count": 16,
"commentsbox_count": 0
}
]
}
So, you could say Graph should show only 80, but it shows only 13 likes:
{
"id": "415948168442690",
"name": "Prefixo 9",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/372843_415948168442690_618178971_s.jpg",
"link": "http://wesleydesouza.com.br/prefixo9/",
"likes": 13,
"category": "Website",
"is_published": true,
"description": "Adicione o nono d\u00edgito de celular de S\u00e3o Paulo aos seus contatos do Google. R\u00e1pido. F\u00e1cil. Gr\u00e1tis.",
"about": "Adicione o nono d\u00edgito de celular de S\u00e3o Paulo aos seus contatos do Google. R\u00e1pido. F\u00e1cil. Gr\u00e1tis."
}
And this reflects inside Facebook's page admin, that also shows me only 13 likes.
For whatever reason, the facebook is not reading the opengrapgh tags on the following pages:
http://www.nydailynews.com/new-york/court-order-city-t-occupy-wall-street-protesters-stuff-zuccotti-park-article-1.977674
The FB Linter passes w/o any issues:
{
"url": "http://www.nydailynews.com/new-york/court-order-city-t-occupy-wall-street-protesters-stuff-zuccotti-park-article-1.977674",
"type": "article",
"title": "Court order: City can\u2019t keep Occupy Wall Street\u00a0protesters and their stuff out of Zuccotti Park \u00a0",
"image": [
{
"url": "http://assets.nydailynews.com/polopoly_fs/1.977661!/img/httpImage/image.jpg_gen/derivatives/searchthumbnail_75/image.jpg"
}
],
"description": "Hours after baton-wielding cops cleared Occupy Wall Street protesters and their tents out of Zuccotti Park, a judge signed a order Tuesday saying the demonstrators can return with their stuff.",
"site_name": "NY Daily News",
"updated_time": "2011-11-15T14:48:15+0000",
"id": "10150378344639794"
}
However when I try to like/recommend, only the link is pulled on my wall, and not any other tags.
If you compare your given url with another article's url You'll notice an extra section in your URL's version .... "Redirect Path" ... with the HTTP Code 301 which indicates an Permanent Redirect ... seems like this page is being redirected behind the scenes ... Hopefully that sheds some light on the issue ...
Little more info on the HTTP 301 Code