w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Posting image on Facebook wall it is too small and not saved in photos album in android java
I believe you should be uploading images to someone's album rather than to their wall (as you're doing). Try this: (I realize this example is php, and not java... I'll see if I can dig up the java sample). https://developers.facebook.com/blog/post/498/ edit: Here's an Android sample: http://sunnysharma4android.blogspot.com/

Categories : Java

How to get shares count for a Photo in Facebook?
Instead of GET /ID use GET /POST_ID to get the shares count (if >1). You'll get the result as- "shares": { "count": x } Note- the Post ID is generally: USERID_PHOTOID ORPAGEID_PHOTOID

Categories : Facebook

Ruby on Rails - Add photos to existing album or create new album
What about having an ajax call from the second option(create a new album) that would open a pop-up that would create the album? At this point you have an album that you can assign the image to.

Categories : Ruby On Rails

Python/Facebook-SDk How to get shares count for a photo posted on a page
You need to use the post id which should be of the form pageid_postedid. For example for this photo https://www.facebook.com/photo.php?fbid=10151690351123254&set=a.100690783253.87226.80329313253&type=1&theater The id of the photo is 10151690351123254 The id of the page is 80329313253 The post_id is 80329313253_10151690351363254 So then you can request the shares as 80329313253_10151690351363254?fields=shares { "shares": { "count": 4435 }, "id": "80329313253_10151690351363254", "created_time": "2013-06-19T18:02:31+0000" } Or in your case in Python something like fb.request(path='/80329313253_10151690351363254', args={'fields': 'shares'})

Categories : Python

Wrong "Like count" in Facebook Album Stream
Likes collection is paginated. You can read more about pagination here. Looks like there is still no way to get all rows count for a collection using graph api request. But you can get it through FQL. select like_info, object_id from photo where album_object_id = 132827113407662 Returns: { "data": [ ... { "like_info": { "can_like": true, "like_count": 31, "user_likes": false }, "object_id": 635486689808366 }, ... ] }

Categories : Facebook

Facebook JS SDK - Does photo album exist? - create album only once
Permissions required: For fetching the albums/photos: user_photos For posting albums/photos: publish_stream How to detect if a Facebook Photo Album exists so I don't create it again? Make a GET request to /me/albums. You'll get the list of the albums, see here Then you can check whether or not the album already exists using the Album ID Note: You can save the Album ID as the response when you create an album

Categories : Javascript

Display Album's Photos with EmberJs
Your approach is correct, but there are some issues with your fixture data. your fixture javascript is not formatted property (you need to remove the -) you need to not embed the Photos records, instead put them in the Photos fixture and reference them by id need to add some ids to your fixture records and make sure some are not duplicated Working JSBin

Categories : Ember Js

How to save photos to phones library/album?
This function will serve your purpose. It is for saving the image in library. UIImageWriteToSavedPhotosAlbum(UIImage *image, id completionTarget, SEL completionSelector, void *contextInfo); Example: UIImage* imageToSave = [imageView image]; // alternatively, imageView.image // Save it to the camera roll / saved photo album UIImageWriteToSavedPhotosAlbum(imageToSave, nil, nil, nil);

Categories : IOS

Missing photos when retrieving Users tagged photos facebook-graph API
The only thing that comes to mind is the settings of each user since according to the answer posted here - facebook graph api - missing fields, API access to these things can be turned off at the user's discretion.

Categories : Facebook

FQL How to select all photos a user is is tagged in filtered by album?
Start looking into multi-queries and batch this should increase your performance. So your last query would be an array calls in batch separated by album and each call will be a multi query between the photo and photo_tag table. https://developers.facebook.com/docs/reference/api/batch/

Categories : Facebook

An answer to the 'how to get Facebook shares and likes of some URL ?' questions
To get likes and shares counts, I use FQL instead of the Graph API (even though I am actually using the Graph API to send the query). But this is not enough : to be able to do so, I had call the rawurlencode() function on the URL I want to get data about. Otherwise, I'll keep getting errors. So, this likes(), the function I am using to have the counts : function likes($url) { $url = rawurlencode($url); $json_string = file_get_contents("http://graph.facebook.com/fql?format=json&q=SELECT%20share_count,%20like_count%20FROM%20link_stat%20WHERE%20url='$url'"); $json = json_decode($json_string, true); if (key_exists("data", $json)) { if (is_array($json["data"])) { if (array_key_exists("0", $json["data"])) { return intval($json["data"]

Categories : PHP

Shares from facebook fan page to show 'via' appname
That will be done when the shares are actually done by your real app. You cannot add 'via my_app_name' on your own. For example: If you play a level on Angry Birds, and get a new high score. It will be saved there and the app name will be saved, or when you upload or post a new content on Twitter or Tumblr, you will see that there is the name of app too. Otherwise facebook just lets you edit your 'feeling...' 'in...' 'with...' but not 'via...'. Create an app: You can create the app, and then use it to share content! You can check out there developer documents to let your app share content from web or facebook on your timeline! This way, users will see your content being shared 'via my_app_name'. Bravo! Once done! It will automatically do the job for you to show the 'via...' thing. E

Categories : Facebook

How to query for the number of shares of a Facebook event URL?
Well, I believe you can't get this until you are the owner of this post. If you were the one who created this post on facebook or one of the admins of the page which is linked to (http://www.facebook.com/events/385623724876261) event then you would get the shares count. Try fetching the information from the admin's access token or the one who created this event. If that doesn't work out for then the last thing you can do is try fetching this piece of information from page access token (which belongs to a page). Let me know if you are still not able to get this piece of information even after trying with Post Owner's token, Admin's token and lastly Page Access token. Cheers, Reno Jones

Categories : Facebook

Facebook Graph API & django-facebook - posting links and photos to page feeds
Facebook Graph API PHP SDK posting on page as page Found it. There is a different access token for impersonating the page to post as the page. You get that from /me/accounts and use that token to post as the page. Updated working code: @facebook_required_lazy(scope=['manage_pages', 'publish_stream', 'photo_upload']) def index(request): if request.method == 'POST': form = CPYPosterForm(request.POST) if form.is_valid(): fb = require_persistent_graph(request) msg = form.cleaned_data['msg'] pages = form.cleaned_data['pages'] me_accounts = fb.get('/me/accounts') access_token = None resp = dict() for p in pages: for d in me_accounts['data']: if d['id']

Categories : Django

Retrieve 'date and time' for Facebook shares and likes?
Sorry, but what you want to achieve is just not available through the present Facebook APIs. The data regarding to likes and shares that you can retrieve about the post is just limited to array of likes with just id and name and shares array with count

Categories : PHP

How do i get facebook album id from url?
For the sake of this question having an answer (I missed out @CBroe comment the first time I landed here). The album ID is the first number right between a. and the next following . (dot). In this case: 531274833612778

Categories : Facebook

Parsing graph.facebook album
After many hours of scratching head, came to this solution. Not much efficient one, but it will do the things you need. JSONObject albumObj = json.getJSONObject("albums"); // Log.d("Json values", albumObj.toString()); JSONArray dataArray1 = albumObj.getJSONArray("data"); for(int i=0; i<dataArray1.length(); i++){ // Log.d("data id", dataArray1.getJSONObject(i).getString("id")); JSONObject photoObj= dataArray1.getJSONObject(i).getJSONObject("photos"); // Log.d("photo object", photoObj.toString()); JSONArray dataArray2 = photoObj.getJSONArray("data"); for(i

Categories : Android

Upload album to facebook from another website
Yes of course it is possible. First of all you need the permissions: user_photos to get the access to the user's album publish_stream to post photos to an album You can create an empty album of a page by issuing an HTTP Post request to me/albums with following parameters: name- The name of the album message- The description of the album In return you will get the album_id which you can use to post photos into You can add photos to an album by issuing an HTTP POST request to ALBUM_ID/photos with following parameters: source- Photo content (multipart/form-data) message- Photo description string Reference: Album

Categories : Facebook

Upload photo to Facebook album using user_photos on ios
user_photos only allows you to see photos (using GET), and does not allow you to post a photo. To do that, you need either publish_stream or publish_actions. Are you sure your app didn't already have a publish permission somehow? You are correct in that the privacy is set when an app requests publish permissions, and the user can change that at any point later on as well (via the Facebook app or website).

Categories : IOS

How to read all facebook album from my FB account without login
To read an Album you need Any valid access token if it is public and belongs to a Page The user_photos permission if it belongs to a User The friends_photos permission if it belongs to a User's friend Source: https://developers.facebook.com/docs/reference/api/album/ Your example applies to a page. This is why you can get the album information without any token. As the documentation explains, you will need permissions to access the albums of a user. With permission, comes a token, which implies a user to login. So, you can't read all facebook album from your FB account without login.

Categories : PHP

Script to delete photo from facebook fan page cover album
is there any way to delete photo from facebook fan page cover album Just like you make GET and POST request; do: DELETE /post_id/ photo_id But only if the photo is posted through your app!

Categories : Json

Is it even possible to tag photos in Facebook?
You must get Photo ID firs and then tag someone on this photo upload photo to album $photo_details = array( 'message' => $message, 'access_token' => $token ); $photo_details['image'] = '@' . realpath($file); $uploaded_photo = $facebook->api('/'.$album_uid.'/photos', 'post', $photo_details); Get Photo ID $photo_id = $uploaded_photo['id']; set Friend ID you want to tag $tags = array( array('tag_uid' => $friend_id, 'x' => rand() % 100, 'y' => rand() % 100 ) ); tag friend $facebook->api('/'.$photo_id.'/tags', 'post', array('tags'=>$tags)); It works for me, I hope this will help you

Categories : PHP

What is a way to get a user's photos from Facebook (iOS)?
Simply fetch the data through this url: http://graph.facebook.com/philiparpin/picture Replace philiparpin (my name) with the name of the user you want to get the photo of. Resource: http://developers.facebook.com/docs/api

Categories : IOS

Get all photos of a page using Facebook API
When you get your Facebook user, you can: get the list of all its albums get the user's profile picture get the photos the user (or friend) is tagged in They respectively need those permissions: user_photos or friends_photos not needed user_photos or friends_photos UPDATE: If you want to get those information from a Facebook page: Photos - The Page's uploaded photos. Albums - The photo albums the Page has uploaded. Permissions are: any valid access_token or user access_token

Categories : Facebook

How to get photos from a facebook page
You can get the user pages using- "/me/accounts" Then for any PAGE you can query following using the page access token which you received from the above call- "/PAGE_ID/photos"

Categories : Facebook

Facebook Like Box - photos does not appearing
In your script for the lightbox, change show_faces=false to show_faces=true. And for the other images, make sure the source is correct. Facebook uses background images in the stylesheets where the url goes to a third server and the image names since to be hashes. Check the image source in your script and make sure it does not change in your site. So far, I did not see any image location in your script for your photos.

Categories : Facebook

Get all photos the user is tagged in on Facebook
On-picture tags are not the same as tags in the description (post). There are three FQL tables to get the content where a user has been tagged: photo_tag to get tags on photos, stream_tag to get tags on posts, video_tag to get tags on videos. You used the first one but you also need the second one. Similarly to your photo tags request, you will then have to use the stream table.

Categories : Facebook

Retrieve facebook photos uploaded by me
Use FQL to get only your photos: String query = "SELECT pid, src, src_small, src_big, caption FROM photo WHERE owner=" + yourUid; List<JsonObject> queryResults = facebookClient.executeFqlQuery(query, JsonObject.class); for(int i=0; i<queryResults.size(); i++) { String photoUrl = queryResults.get(i).getString("src"); // add your code to use photoUrl } And the you can iterate through queryResults to get src for each image.

Categories : Java

Using the Facebook php SDK to retrieve photos and about info
but I'm not sure how to pull album photos so I can display them throughout my page when the user logs in. Take a look at this awesome tool- Graph API Explorer Also, you should read about the Permissions. By taking the different permissions from your user, you can fetch the related data of the user. You can test the same using the Graph API Explorer- just click on Get Access Token to set the different permissions. For eg, if you want to fetch the user's photo, ask for the permission (while login, using scope parameter)- user_photos and simply call: /me/photos Live Demo users' information like work permissions: user_work_history call : me/?fields=work Live Demo

Categories : PHP

PHP Facebook API Import photos not working
You didn't ask for permissions. $loginurl = $facebook->getLoginUrl(); becomes $loginurl = $facebook->getLoginUrl(array('scope' => 'user_photos')); Read more about getLoginUrl here. And you will find the list of permissions here.

Categories : PHP

Uploading photos or videos to Facebook using Python
This works for me. import requests url='https://graph-video.facebook.com/100000198728296/videos?access_token='+str(access) path="/home/abc.mp4" files={'file':open(path,'rb')} flag=requests.post(url, files=files).text print flag flag will return json containing video id on successful upload of video

Categories : Python

Getting facebook photos in one json request with jquery
This should get you started. Just let me know if anything is unclear. var url = 'http://graph.facebook.com/'; url += '868.Rotary.Northstar.RCACS/albums?fields=photos'; //to save some space here $(function(){ $.ajax({ url: url, dataType: 'jsonp', success: function(data){ $.each(data.data, function(k1, album){ if(k1 > 1) //just showing the first 2lists for demo purpose return true; //skipping the rest var pictureArray = album.photos.data; //get an array of photos $.each(pictureArray, function(k2, pictureObject){ //pictureObject.picture contains the image url //create a new image tag and append it to the bo

Categories : Jquery

How to delete facebook timeline photos with php graph api?
You can delete a tag for a particular user in the photo by issuing a HTTP DELETE request to /PHOTO_ID/tags/USER_ID or PHOTO_ID/tags?to=USER_ID. Deleting a tag on a photo requires the publish_stream permission and supports the following parameters. Parameter Description Type Required to USER_ID of the User to tag; can also be provided in URL path (see above). string yes If the deletion is successful, you get the following return. Description Type If the deletion succeeded boolean for more info study the graph api for photo here http://developers.facebook.com/docs/reference/api/photo/

Categories : PHP

Displaying all photos from all albums of a Facebook page
Using Graph API: Separated queries Get all albums ID: graph.facebook.com/PAGE_ID/albums For each album ID, get the pictures: graph.facebook.com/ALBUM_ID?fields=photos.fields(source) One-liner graph.facebook.com/PAGE_ID/albums?fields=photos.limit(100).fields(source) Using FQL: Multi-query { "query1":"SELECT aid FROM album WHERE owner = PAGE_ID", "query2":"SELECT pid, src_big FROM photo WHERE aid IN (SELECT aid FROM #query1)" } One-liner SELECT pid, src_big FROM photo WHERE aid IN (SELECT aid FROM album WHERE owner=PAGE_ID)

Categories : PHP

Facebook FQL: Get group post status photos
Just saying that it works fine for me: SELECT post_id, attachment, type, message, created_time FROM stream WHERE post_id="POST_ID" POST_ID looking like: 481234567779150_559912345679366. The permissions I use are user_groups and user_friends. { "data": [ { "post_id": "481234567779150_559912345679366", "attachment": { "media": [ { "href": "https://www.facebook.com/photo.php?fbid=10123450&set=gm.5599123456789366&type=1&relevant_count=1", "alt": "bla bla bla", "type": "photo", "src": "https://fbcdn-photos-f-a.akamaihd.net/hphotos-ak-prn1/1013188_102013456789034740_1177097408_s.jpg", "photo": { "aid": "65904234567838363", "pid": "65904345678990795",

Categories : Facebook

How to fetch albums photos from facebook using fb_graph gem?
Try: results = FGraph.get('/user_id/albums') user_id can be "me" Always good to play w/ the Facebook Graph API Explorer

Categories : Ruby On Rails

PHP, retrieving specific image from an album as a thumbnail for that particular album
I tell you what went wrong. You return an array containing arrays with your get_images_gallery function. You itterate over the albums array with your foreach and ONLY over the albums so what you could do to make your code work is this: </p><img src="admin/uploads/', $images[0]['album'],'/',$images[0]['id'],'.', $images[0]['ext'],'"title="Uploaded', date(' DM Y/h:i',$images[0]['timestamp']), '"alt="hello" height="100px" width="100px"/> If this isn't giving you the desired output you have to itterate over the images inside the albums loop again

Categories : PHP

graph.facebook.com/me/home photos width and height
Graph API do not return the size of the image in terms of width and height. However, you can specify the size you want to retrieve using 'height' and 'width' parameters e.g: me/picture?width=70&height=90 Also, there are some default sizes you can retrieve using 'type' parameter: https://developers.facebook.com/docs/reference/api/using-pictures/#sizes In the end, you can retrieve a picture of any size and programmatically get its width and height. Javascript examples: Modern browsers and IE9+: var width = document.getElementById('yourImg').naturalWidth, height = document.getElementById('yourImg').naturalHeight; console.log(width, height); For IE8-: var img = new Image(), // or document.createElement('img') width, height; img.onload = function() { width = this.

Categories : Facebook

uploading photos/videos on facebook app running on android or ios?
"should I expect any problems with uploading photos/videos from mobile devices -> android, iOS, blackBerry ?" No. But 1 thing you should know that the user wont be able to post photos/videos to the friends wall (if that's in your requirement); yet there's a workaround that the user can tag his/her friends in the photo/video. Some links that might be useful to you- Videos Android iOS API Reference Photos Android iOS API Reference

Categories : Android

iOS - Facebook Open Graph Api -- ensuring that photos are user generated
You should be able to replace your code: if (photoURL) { NSMutableDictionary *image = [[NSMutableDictionary alloc] init]; [image setObject:photoURL forKey:@"url"]; NSMutableArray *images = [[NSMutableArray alloc] init]; [images addObject:image]; action.image = images; } with: if (photoURL) { NSMutableDictionary *image = [[NSMutableDictionary alloc] init]; [image setObject:photoURL forKey:@"url"]; [image setObject:@"true" forKey:@"user_generated"]; // <======= ***add this line*** NSMutableArray *images = [[NSMutableArray alloc] init]; [images addObject:image]; action.image = images; }

Categories : IOS



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.