blog id on blogspot - tags

I want to create a button on Blogspot. The button must send me the blog.ID and post.ID.
I can get the post.ID with code <data:post.id/> but don't know how to access blog.ID?

I have worked on Blogspot (http://www.blogger.com) and i have edited my Blogs many times.
As far as i know there is no attribute to fetch blog id ..
like u said you can access Post using
data:post.id
I have not seen any provision for fetching blog Id yet.
How you can see your own Blog id.
Refer this to Find Your Own BLOG id..
http://myfundoo-blog.blogspot.com/2010/05/add-reply-option-to-blogger-comments.html
But you can certainly play with other attributes like
data:blog.url
or
data:blog.homepageUrl
By the way,its not possible to other People's Blog id using Button on your blog.
You can simple find Blog Id of your own blog using THIS..
Regards,
Sangram Nandkhile

You can dynamically get the blog ID with teh data tag:
data:blog.blogId
So, for example, if you insert the following code in your blogger template, it will display your blog ID:
<data:blog.blogId/>

Related

How to link to single facebook comment by comment_id

I'm retrieving Facebook comments using the graph api. This also returns the id of each comment retrieved. I would like to add a direct link to each comment on Facebook, but I can't figure out what URL I should use.
I know that for example to link a profile/user by id I can use
https://facebook.com/{user_id}
What's the URL for a specific comment?
If I understood your question, I think the structure of the URL for any post comment would be:
https://www.facebook.com/[NAME_OF_THE_PAGE]/posts/[POST_NUMBER]?comment_id=[COMMENT_ID]
The words in brackets you need to retrieve through the Graph API.
If for example you need the comment URL of a video you just replace posts with video and put the according video_number
Hope it helps!

Get restaurant menu from Page using Facebook Graph API

The problem is to get the link to menu from a Facebook official page of a restaurant.
Here is an example of such page: https://www.facebook.com/freshchoice.bb — there is a link to menu of the restaurant which leads to https://www.facebook.com/download/216155385221332/Facebook%20menu.pdf.
Actually, this link works well even if I remove the name of the file from it, and I understand, that 216155385221332 is an ID of some object. But how can I obtain this ID from the API?
I have already spent two days trying to find a solution for this task and have had no luck.
When I request data from Facebook Graph API, I get tons of information, and I can request any of the fields listed here: https://developers.facebook.com/docs/graph-api/reference/page but there is no 'menu', or 'downloads' field, and I have almost broke my brain trying to find out a way to solve this puzzle.
I don't think there's a way to reach this object if you didn't create it yourself.
There's the restaurant.menu OpenGraph object:
https://developers.facebook.com/docs/reference/opengraph/object-type/restaurant.menu/
but I think only the user who created it can access it programatically.
The page you're referring to probably just uploaded the menu via the Facebook website, and didn't create an OpenGraph object.
Se
https://www.facebook.com/help/533179700126832

Facebook Graph API: Get post/status attached photos

How can one get multiple attachments of a post/status in a group?
For example: A group status that some member wrote and added multiple photos to..
Currently I am using Graph api to get the group stream with group_id/feed and unable to see images attached to a single status - while accessing the feed from Facebook itself I can validate that there are few photos attached to the status.
Using FQL it is possible to get the attachments with the following query:
SELECT attachment FROM stream WHERE post_id = each_post_id
Considering I will have to send this request per post and that FQL will soon be gone I am searching for an alternative.
I was looking for a solution for this as well and actually just found it.
The Facebook Platform changelog says the following:
/v2.1/{post-id} will now return all photos attached to the post: In
previous versions of the API only the first photo was returned with a
post. This removes the need to use FQL to get all a post's photos.
With this knowledge I went to the Graph Api Explorer and found a post that had 2 attachments or more added to it.
After finding the post, and with that the post id, I tried the request Facebook told me to do:
/v2.1/{post_id}
This does NOT give you the desired result. The nice thing about the explorer is that you can search for fields you want to add to your request.
You want to add the attachments (plural) field. NOTE: It might be that the graph api explorer only shows the attachment (singular) field. This is NOT right.
So, to summarize:
Get the post id of the post containing the images.
Create a new request to the graph api that looks something like: /v2.1/{post_id}?fields=attachments
Then read the result to get your desired attachments.
I hope this helps you out as I have been struggling for a while as well.
KR
PS: This is tested with a user and not a group, but it should be basically the same.
PS2: This is just an explanation of how you get attachments of a single post. You can also add the attachments field to the /me/home egde to immediately get all attachments at every post like so:
me/home?fields=message,from,attachments
PS3: The permissions you need are
user_status
read_stream
user_photos
user_videos
Facebook is not very clear on this matter and it is very hard to figure things out like this. So I hope this will help everyone that is searching for this solution.
I answered for the same question here : /v2.1/{post-id} does not deliver photos
It seems it's a Facebook bug. My colleague opened an issue. Here's the link: https://developers.facebook.com/bugs/762280800482269/
You also can find some info here:
https://developers.facebook.com/bugs/790976317600139/
Hope it will help you.

Get URL (Link) for facebook post using post ID

I am trying to get a post from a company Facebook page.The link is for an application i developed that feeds of information from another applications database that uses the Facebook API.
i want to create a link eg www.facebook.com/{postID} that will take me to the specific post.I have tried numerous articles and all seem to send me to a 404 page. Please help.
Thanks
My Application uses the facebook api that accepts data related to a facebook page content (i.e posts,photo's,statuses etc).part of the api is that it saves the actual post id pertaining to a post for e.g. 302961133120433_576487772434433 into my applications database.As you may see that the post id has 2 parts separated by an underscore.So i needed to make a url based on this post id.
Solution for the link is:(2 parts of it,first being page id and second being actual post id)
Hope this helps.
You have facebook API doc on post here : https://developers.facebook.com/docs/graph-api/reference/v2.8/post
the URL you want is called "permalink_url" as field name, so the API call to get that link is in this format:
URL = 'https://graph.facebook.com/v2.8/' + postId + '?fields=permalink_url&access_token=' + facebookToken
Here is a screenshot for my testing in FB API explorer.
If you want to get a list of posts on IDs on a particular page, it doesnt seem to be documented but this works:
https://graph.facebook.com/teapartypatriots?fields=posts.id&access_token=<TOKEN>
If anyone only needs to redirect to the post URL, just put the post id after https://www.facebook.com/ and it will be automatically taken to the post.
more information from the official docs https://developers.facebook.com/docs/pages/publishing/

Facebook Comment Like count

i testing the webpage where i want to pull current users comment like count on my webpage.
I tested so many code but anything is not working for me.
Can anyone show me how to pull the like count for current users comment.
I tried Javascript, php sdk but could not pull the information.
Thanks in advance.
In addition to having a unique ID for each comment, you should have a common ID that references the page/topic they are on. Its then very easy to do a SQL select where page ID is that particular page and get the count.