Context: Share a webpage on facebook wall of users
Share a webpage with a image
After some minutes, the image is deleted from my website
About some days (7 or use og:ttl), the webpage is re-scraped. In the sharing post on facebook wall, the image is lost.
Hope that the image of the sharing post will never be lost. Thus, og:ttl should be set very-large value.
At https://developers.facebook.com/docs/sharing/opengraph/object-properties?locale=en, og:ttl has minimum value 345600 seconds (4 days). But maximum value is not given.
How much is maximum allowed value of og:ttl of facebook sharing? Could I set very-large value (3153600000 ~ 100 years ~ forever) for the tag?
In case that the very-large value is allowed, Whether is the webpage still re-scraped but the time is not expired?
According to Facebook, the maximum og:ttl value is 2419200 seconds. That's equivalent to 28 days.
I came to this answer by setting my og:ttl to a very large number, then used the Facebook Debugger to scrape the page. The debugger returned an error: The og:ttl property must be an integer between 345600 and 2419200.
Related
I'm using the Graph API to grab values from Facebook Insights, but I don't have a Facebook page to test it on. The one I created has only one like, and when I went to check the page likes the values remain 0.
array (size=2)
'value' => int 0
'end_time' => string '2015-09-01T07:00:00+0000' (length=24)
I was reading through the documentation and says,
"Page Insights are available after at least 30 people like your Page.
Please keep in mind that it can sometimes take several hours for
insights to become available after 30 people have liked your Page."
I can't really get down into testing my code (and graphs created from these values) properly without any real numbers... is there a way to test this?
Does anyone know the maximum limit of description field in facebook feed sharer?
It seems to be 100 characters but I can't find any documentation says about max length od description field.
It's as of today 100 characters for the title and 108 characters for the description. That's what shows up in the preview when you post a link to Facebook. The actual sharer.php page however will show more of the description.
There is a related question here:
Facebook open graph meta tags maximum content length
(since open graph tags are used by the sharer)
It seems the answer is that there isn't a hard limit, but Facebook will truncate it as needed, which is different depending where it is used; and that the limit for news feeds changes all the time.
I need to get ALL user likes at once without pagination.
I could hit: graph.facebook.com/me/likes ...however, is there a limit to the # of objects returned by facebook? if so, what is that limit and can it be overwritten?
The default limit is something like 25 results. You can specify a limit by providing a limit parameter to facebook:
https://graph.facebook.com/me/likes?limit=100
Checkout the API Documentation under the heading "Paging".
That said, there's never a guarantee that you'll get all the likes at once, even if you set the limit parameter to be greater than or equal to the number of likes on an object.
On top of that, you'll often find that the number of likes reported on the Facebook website or by the Graph API is higher than what you can get by fetching the /likes connection in the Graph API. I'm trying (and failing) to find the SO question that talked about why that is, but if I remember right that number sometimes includes shares and other actions, not just likes.
You should use the pagination to page thru all the data that the Graph API can return.
I'm trying to retrieve all the photos a user is tagged in using the Graph API but I can only get the latest 25.
Is it possible to get more, and if so, how?
Have you tried adding a limit and offset parameters? Quoting the documentation:
Paging
When querying connections, there are several useful parameters that enable you to filter and page through connection data:
limit, offset: https://graph.facebook.com/me/likes?limit=3
until, since (a unix timestamp or any date accepted by strtotime): https://graph.facebook.com/search?until=yesterday&q=orange
Currently there is 100 items limitation per query both on photos and likes:
However, 100 pics query takes so much time to run for me.
The following API call:
https://graph.facebook.com/me/photos?limit=500
gives only 100 results with paging link.
Run in FQL explorer (If you have more than 100 pic on your account):
https://developers.facebook.com/tools/explorer/?method=GET&path=me%2Fphotos%3Flimit%3D500
Setting limit=0 may not always work in the case that a user has a huge number of tagged photos. Also note that the tagged photos graph API can return a large number of embedded comments as well, so especially if you are developing a mobile app, it can take a long time to return all the photo data. Finally I find that sometimes Facebook will limit the number of entries it can return in times of high load.
So... perhaps the best way is to use the "paging" "next" url that appears at the end of the returned photo data. This gives you the next graphAPI call that you can then use to get the next x photos. It does this by using and pre-populating the limit and until parameters and incorporating them within the graph api call. Very handy.
I would think there would be a cut-off on the number of posts, or a cut-off in time period after which I won't be able to get the posts. From a few test runs, I am unable to form any idea as for some pages it returns all the posts till the beginning whereas for some it stops midway. Also neither is the number of posts hinting towards a constant limit, nor is the first post time hinting at any time cut-off.
The documentation(http://developers.facebook.com/d...) doesn't talk about any limit, so I am out of ideas. Can anyone throw some light on this and provide some credible information? Thanks already for your time.
The documentation https://developers.facebook.com/docs/reference/api/user/ was updated to show you get up to 25 posts.