i am using the following url for posting message to user wall via my application
https://graph.facebook.com/100002944254185/feed?client_id=129042607197622&message=found&oauth_version=2.0&oauth_nonce=5887e5b11904194f7d217e9b7f795d62&oauth_timestamp=1317623602&oauth_consumer_key=129042607197622&oauth_token=CCCB1XRLDTbYBAOwHYTO6qw1NswhUt99e0ov9yYG4CYAXahGi1VkycZAo8rWWDWfuq21w2jjZA49f4zNLZAM3JMGfTlj8d4rPTnTcvVcDk7T9iWY5HuY&oauth_signature_method=HMAC-SHA1&oauth_signature=96b104ee6b4576e7526390b287e7a32d&redirect_uri=https://apps.facebook.com/mymegha/
and this is working
what will be the format for uploading a photo?
What all should be included in the url and what else in the header. How the format will be?
Please help me out...
I got it solved. Inorder to upload photo the data should be specified as "multipart/form-data". It works..
Related
Looking at some tutorials (I can't find the link I consulted), I was able to access an issue's attachment, but I'm not able to transform the data (Binary) into an image. follows an image of how my response is coming.
enter image description here
Are you perhaps referring to https://bim360-issue-editor.herokuapp.com? The source code of this sample is available at https://github.com/petrbroz/bim360-issue-editor.
Here's how the server side requests the attachment: https://github.com/petrbroz/bim360-issue-editor/blob/develop/routes/api/issues.js#L309-L331.
And here's how the client side turns it into an image:
https://github.com/petrbroz/bim360-issue-editor/blob/develop/public/issues.js#L405-L443
I'm having an issue trying to write the correct GET request using the Facebook API explorer tool.
I'd like to access all my Facebook pages and the below data from their respective posts. I can achieve this by adding the page name manually, but I'd like it to be more dynamic if I was to add more pages in the future.
posts?ids=Pagename,Pagename,Pagename,Pagename&fields=message,created_time,full_picture,shares,likes.summary(true).limit(0),comments.summary(true).limit(0),from,permalink_url
I know you can use me/accounts but I've had no luck when trying the append the above posts GET request.
Furthermore, I'd like to get the page profile picture from the posts. Just adding picture to the above request doesn't work. Since the profile picture is displayed in each post I'd imagine there is a key to access it?
Any help is appreciated.
I discovered the answer after I reread the documentation
https://graph.facebook.com/v7.0/me/accounts?fields=picture,posts{message,created_time,full_picture,shares,likes.summary(true).limit(0),comments.summary(true).limit(0),from,permalink_url}
All attached accounts profile picture + above data.
I was wondering what the html code was to let users upload their images to my html webpage, I looked at https://www.w3schools.com/php/php_file_upload.asp but when i enter it, it does not work, so if anyone has a code, preferably without a php file required, please share it with me. Thx!
In order for users to be able to upload images to your website, there needs to be a place for those images to be placed. This is the role of the your server. In the example above, they are using a php server to keep track of the image that was uploaded, and serve it back to the user when requested. So, while you may have followed the code in the example, without a server, users cannot upload anything to your site.
Unsplash prefers that users of their API hotlink images from urls that they provide.
Seems almost silly to be asking this, but for some reason this simple piece of code is not working when trying to hotlink an image, whose url I grab from the Unsplash API:
<img src="https://images.unsplash.com/photo-1484995342839-a9eb42974616?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=400&fit=max&s=3c7ad78ab40416cdfae002147d8b8003">
This url comes is found in their GET photo response under: photo.urls.small
It is probably a minor oversight on my part, anyone see my mistake?
Problem was an extension called Privacy badger on Chrome that is blacklisting the link.
When I test the code it works. Possibly a cache issue?
<img src="//images.unsplash.com/photo-1484995342839-a9eb42974616?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=400&fit=max&s=3c7ad78ab40416cdfae002147d8b8003">
It is because of the parameter in that image URL. Do try by eliminating the parameters after "?" and just pass the remaining URL as below:
https://images.unsplash.com/photo-1484995342839-a9eb42974616
I'm able to post a status on the users wall using GRAPH API - https://graph.facebook.com/me/feed/. But I have problem with the image associated with the post.
In my case, the picture URL looks like this : https://images.XXXXXX.com/Images.aspx?imageId=??? , retrieves image based on request parameter . If I mention the URL as above I don't see the images displayed . Whereas if I mention the picture URL as a static URL (i.e. https://digitalpictures/test.gif), it works . Please help me to resolve this problem
You could save the image from the picture URL as a file with a static URL, then delete it once it's been uploaded to Facebook.
Make sure the https://images.XXXXXX.com/Images.aspx?imageId=??? can be seen by the facebook linter tool. Use it as an og:image tag on a public url. If facebook can't lint it, you can use it as the Picture URL in your graph API call.
Add Open Graph tags to the GRAPH API request, specifically "og:image", "https://images.XXXXXX.com/Images.aspx?imageId=??" for your image.
Facebook Open Graph Protocol 1