Why can't I post to a fan page from my iOS app? - iphone

I want to post images from my iOS app to a single Facebook fan page. I'm new to facebook-sdk. I can post to a user's page with no issue using either facebook sdk or social framework, but what I cannot work out is posting to a fan page. I have set up a fan page and have set it to allow posts from anyone but when I try it with the url /pageID/picture it won't work. It'll work for admins, but I want non-admins to be able to post.
What do I need to do?
I can post image but it end up only in my images . no matter what url I Use
fb /me/photo or /fan_page_id/photo the images only end up in my image folder not on the wall please any help would be great I can find 1000's of questions on this but no answer .

I have fixed it I never added this key to my options dict
ACFacebookAudienceKey: ACFacebookAudienceFriends
In the Account framework header it has it marked as optional but I could not request any thing other then read permission but after adding this key to my options dictionary it worked I dont know why this makes a difference but it fix my issue with out it I could only post to my images folder and I could not request permission other then read . After adding key I can post to wall and fan page wall and request any permission I need.

In your Fan Page, Look for "Edit Page" option. In that part, click on "Manage Permission".
In Manage Permission page,
Check
Posting Ability:
1> Everyone can post to <> timeline
2> Everyone can add photos and videos to <> timeline
Also take a username for your fan page to refer your user in a easier way.
Update
You have to create an facebook application for the requirement.
Following three links may help you -
1> Posting a photo to Facebook fan page as user. iOS Facebook SDK 3.1
2> https://developers.facebook.com/docs/reference/api/page/#photos
3> http://developers.facebook.com/docs/reference/api/publishing/
Actually, the publish_stream and manage_pages permissions are important.
Thanks

Related

Facebook like count not working on my site

Hope you can help with the below, which I've spent most of this weekend trying to resolve but to no avail.
I use a social share and vote plugin on my website, which works perfectly for G+ Twitter Pinterest etc etc. However my facebook like button simply does not want to work.
Example, yesterday I posted this on my websites facebook page.
https://www.facebook.com/116091541779464/photos/a.496114153777199.1073741829.116091541779464/696621417059804/?type=1
As you can see, this links to this page of my website which has its like, share, +1 counts etc at the bottom: http://www.superluigibros.com/evolution-of-mario
As you can see from the Facebook post it has 85 likes. Yet the website shows only 1 like?
The social plugin that I use asks for an App ID. I have created, and activated an App in Facebook and put the App ID in the relevant field of the plugin.
However I am not sure that the App is actually set up properly on the Facebook side, or maybe it lacks the permission to actually count the likes?
The only other point of note is that I am using another Facebook widget (the one that shows who likes our page) in a seperate module. Could this be conflicting in some way?
If anyone could help would be greatly appreciated. I really dont understand whats up with it
Best regards
Luke
This is the case because those are two completely different things:
On http://www.superluigibros.com/evolution-of-mario the number of likes is the number of times the URL was liked
With https://www.facebook.com/116091541779464/photos/a.496114153777199.1073741829.116091541779464/696621417059804/?type=1 you just posted an image also present on your page to your Facebook pages. The like count show the likes only for this image
So, what you need to do is to add the OpenGraph tags properly to your website, as described at https://developers.facebook.com/docs/opengraph/using-objects#selfhosted-creating Then, you shouldn't share just an image on your Facebook page's feed, but the URL instead. FB will then pull the content for the image etc. from your website upon sharing.
The like counter in your facebook post is handled separately from the likes of your website page. Each "like" that your post receive doesn't count towards the site's like counter.
EDIT: I've just tested your site's like counter, and it's counting correctly as I have just liked it myself.

Facebook photo feed

I was using FB api to post photos to my fanpage's news feed (http://www.facebook.com/MyApp/photos_stream), but from some time it stopped posting it to news feed and it just uploaded photos to some album (http://www.facebook.com/MyApp/photos).
This is the api command I was using before and after it was working, nothing has changed on my side.
$result = $facebook->api('/123456789/photos', 'post', $attrs);
So the question is, how to post photos to fanpage wall (timeline) properly and why it stopped working by itself?
Thanks
I had the same problem a few times ago.
In fact it was working but you have to go to your photo folder and accept the uploaded image.
In the album Facebook will show you a panel saying you have to approve those photos.
By doing this Facebook will publish the images on the timeline.
I know this is very annoying but I didn't find a better solution (I think Facebook has added a new security to avoid some abuses).
EDIT:
Look at the Facebook documentation.
You can post photos to a Page's Wall by issuing an HTTP POST request
to PAGE_ID/photos with the publish_stream and manage_pages permissions
and the following parameters.
Make sure you are using those two permissions and that your parameters are correct.

Redirect user to facebook post

I want to display facebook wall post (by id) on my site in facebook style, or redirect user and focus him on current post at facebook. I`m already display it using open graph with my own css, but it should be look another way. In general i am interesting in second variant with ability redirect user on facebook and show him that post.
May be anyone know how to do that?
Thanks, Anton.
I found solution, https://www.facebook.com/permalink.php?story_fbid=$POST_ID&id=$YOUR_ACCOUNT_ID

Like button for Facebook page shows generic Facebook description in News Feed

I want a Like button on my web site that Likes my Facebook profile (rather than my web page), so that when a user clicks it they subscribe to my Facebook posts.
I've created the Like button using the tool at https://developers.facebook.com/docs/reference/plugins/like/
Further down that page there is an FAQ entry:
Can I link the Like button to my Facebook page?
Yes. Simply specify the URL of your Facebook page in the href
parameter of the button.
So, I've edited the href parameter to point to my Facebook page. eg:
https://www.facebook.com/myfacebookid
When a user clicks the Like button it has the desired effect. The user ends up having Liked my Facebook page. This is easily verified by the user going to my Facebook profile and checking that the Like button has changed to Liked.
But. When the user clicks the Like button, and entry appears in their News Feed with a generic Facebook description. ie:
Facebook is a social utility that connects people with friends and
others who work, study and live around them. People use Facebook to
keep up with friends, upload an unlimited number of photos, post links
and videos, and learn more about the people they meet.
I don't want a generic post about Facebook to appear. I want the description to relate to my Facebook account and/or web site.
Normally, I could modify this behavior with the Opengraph og: description tag, but as the page in the href is a Facebook page and not my own, I can't control the Opengraph tags.
I'm pretty sure that this was working okay before I enabled timeline for my account, so maybe this is a timeline bug?
So, how do I add a Like button which a) Likes my Facebook profile rather than one of my own web pages, and b) Posts a description of my Facebook profile rather than give a generic Facbook description?
Are all your fields in the info part of your page filled in, and/or completed? I just tested your theory and it seemed to work as expected, only thing is I know all fields in "info" are filled it. Give that a try.
This may happen if you have filled invalid/incomplete/wrong og tags in past and later changed them. Facebook's cache creates problem sometime.
Try putting all the entries (i.e. all og tags) and then debug them here http://developers.facebook.com/tools/debug. This debugger gives a detailed info about the url with og tags and also clears the cache for you.
This should solve the problem.
You have 3 important fields that used on page opengraph: Name,Description,Profile Image.
They are used when some one post your link on Facebook, or Google or some else web service that handle opengraph.
Actually, the suggested answers currently do not work and there is an open bug / ticket on Facebook for it. Up to now, there's no fix.
The problem is that you can not use simply https://www.facebook.com/myfacebookid. You should copy and paste the exact page URL. If you have a low number of likes it would look something like https://www.facebook.com/pages/[YourPageName]/[Your page Id]/, and this is the URL that you should use at this point.
If it does not work, try also https://www.facebook.com/[YourPageName]/[Your page Id]/.
In short, copy-paste the URL, do not type it manually.

Facebook Page link to Photos?

Is there a way to link to the facebook photos tab of a Page via an iFrame loaded from a custom App (tab)? If I try to link to num?sk=photos, it gives me the "Go to Facebook.com" loaded in that iframe. I pretty much want a redirect.
Is that possible? Or does FB block link-ins like that?
Let me know,
Thanks!
I've been using javascript to set window.top.location.href = url;, but after reading Igy's comment, I think I'll be switching to target = _top
I think you should check out facebook developer page.
You can use GRAPH API to access photos, photo albums, profile pictures unless any user has different privacy setting.
You might want to check out GRAPH API for that, I hope it might help you to get started.