Facebook - Changing a photo caption via graph api - php

How to change a caption of an image on Facebook in PHP via graph api?
This is the way I used to upload it:
$facebook->api_client->photos_upload($file,$aid,'some caption',$uid);
Any hints?
Thanks.

NO, Its not possible to change caption of image using API.

The Open Graph API does not allow such an option.
It is possible to upload the photo with a new caption, but it looks as if the user has to approve the addition of a photo to his album, and I'm not sure that part is automatable.
If you want further explination try reading This question.
I may be doing something wrong and should not answer as link to same question exists on the comments, but i just thought it's an answer and no one posted it.
If i shouldn't have done that, comment and i'll delete or author delete question.
Don't start voting me down =/

You can't update captions on Facebook. They're quite rigid about that. You can upload a caption, but if it includes a link, it will be "red flagged" as spammy and your app might be taken down. The way they want you to do it is provide a text area for the user to fill out, and then upload that to Facebook. Essentially, have some user-moderated flow that allows someone to add or customize the caption input.
After it's uploaded, there's absolutely no way to change it.

Related

create a thumbnail for the video in vimeo by selecting frame

I need to create thumbnails for the video in vimeo in php (cakephp),
Please have a look at this
User will be selecting the particular frame by clicking on the Use this frame button.
Did anyone work on this, if so please help me..
This is not currently supported in Vimeo's API. You will have to change it on vimeo.com.
The feature will be supported in the future though, so keep an eye on the developer blog for more information.
This is now suppported in Vimeo's Api. Please take a look here. You just need to set the time and active parameters in the following request.
POST https://api.vimeo.com/videos/{video_id}/pictures

Facebook API: user allows permissions, then shares a pre-existing photo to their wall

I've been looking around trying to find a solution to my problem but no luck.
I would like to mimic the "feed" dialog which allows the user the ability to share a link on their wall.
However, I would like the user to share a pre-existing photo on their wall at full size.
If someone could help me out, that would be awesome.
Thank you!
It's possible using the object_attachment param. I'm not certain it'll come out full size though. It'll look like a link story, but the image will pop open the photo viewer lightbox.
Here's a blog post announcing it:
http://developers.facebook.com/blog/post/526/

Fancybox image gallery with ratings and comments

I have a photo website which gathers images from a folder with PHP, displays their thumbnails on a page and, when clicked, opens a fancybox (fancybox.net) to display the full image. I am pretty satisfied with the result but as users start posting, they start asking for new features, and problems come out since I'm not a programmer. What I would like to do is a photo commenting/rating system (like the one on facebook to get the idea, but obviously not as complex): I've been trying to add a Disqus code to each picture, but it won't get displayed in my fancyboxes...So the question is, can you give me any (easy-to-implement) ideas on how to achieve this? I don't mind using already existing softwares like disqus for comments and polldaddy for ratings, since I guess it would require me to setup a mysql database to do it on my own...
To brief it again:
I have a "thumbs" folder which are gathered on a page.
I have an "originals" folder with the full size images that are called back by the fancybox.
I would like to have comments+rating in the fancybox.
Thanks in advance for any advice you can give me.
For your fancybox implementation I'm assuming that it's just pulling the image into the lightbox, not other content (i.e. a html page). What you'd need to do is set up a page which would grab an image, and output it along with your comments + rating code, then set up your script to use that page as the fancybox URL instead of a direct link to the image.
Without more information to go on I can't really help more than that.
ps for comments the Facebook Comments plugin might be easier for a non programmer to implement than Disqus.

Automated image update with page statistics

Frankly I am not sure where this would go but I assume the way to create what I'm about to describe is PHP... so I'm sorry if it's in the wrong section.
Basically I have a website, using Wordpress, where users can review websites and post a 5 star rating of the site. Each reviewed website has it's own dedicated page.
So what I want to do is create an image from the statistics of the ratings to allow the website owners to place it on their page. The image will need to, when clicked, go to that it's review page.
So the image would be about 150x150. Have the overall 5 Star Rating, the Name of the Reviewed site and the name of my website. It would also be cool if there was some automatically generated HTML embedding code so the site owners can simply copy and paste it.
I hope I explained myself ok. I've tried searching google but I'm not entirely sure what to search for and therefore have found nothing useful.
Thanks.
EDIT
I can create the embed code manually. I just need to really know about how to make the picture update automatically.
Hey what you are asking for is quite complex and it would be to easy to just give you code. So here is some reading for you. Your problem is quite meaty and no doubt you'll learn loads sorting it out....
http://www.phptutorial.info/learn/create_images/
http://www.qualitycodes.com/tutorial.php?articleid=20&title=How-to-create-bar-graph-in-PHP-with-dynamic-scaling
I just need to really know about how
to make the picture update
automatically.
Just put URL to your php-script, which will generate image.
You will need function imagettftext to write text over the image, imagecopy to draw the stars (of votes).
Also, you will need image of a star and background.
So, approx. algorithm will be:
1. Open the background image by imagecreatefrompng - it will be our generated image
2. Open the Star image
3. Write title of the reviewed site by imagetttftext
4. Draw stars by copying existing Star image to our background image (by imagecopy)
5. Print generated image by imagepng

How can I generate a thumbnail of a web page for a facebook post?

My app is posting to users' Facebook walls, and linking to a page they have created. The page is in html. I'd like to be able to put a thumbnail of the page as the image on the wall post. I'm not sure whether this is possible or not. Anyone have any ideas?
If it helps, the page itself is stored as a series of 'elements'... for each one, I know the size and position of the element, and the content (which may be text or an image). So I can pull all that in from the database.
I guess it would be sufficient to create a thumbnail using php at the point when the user clicks 'Publish This to my wall', if that's easier than doing it on the fly - I can save the image and then link to it.
Any ideas?
I create thumbnails for my site using CutyCapt, which works very well indeed on both Windows and Linux. You can use exec to invoke this from php.
There are also web services that allow you a quota of free thumbnail snapshots, that are easy to integrate into your website. e.g.
http://www.websnapr.com/
or
http://webthumb.bluga.net/home
I figured out how to do this. I used the PHP gd library, which allows you to create a base image and then add images and text. Works pretty well.

Categories