Desired image sometimes is not shared in status via Facebook Graph API - iphone

I am developing on iOS 4.0(supporting higher versions too).
I am using facebook Graph API, and so far everything works as it should. I can update statuses with images and stuff.
But, there are weird things happening.
I am passing in my FB init class an image link.
But when the FBDialog appears, sometimes the image is there, and sometimes it's not! And i was debugging for a whole while, and i can say for sure: in both cases(when it is and when it's not) the link is not just working: it's totally the same. Practically, i can't find any differences in both behaviors.
What could be the reason? Any help would be greatly appreciated! Thanks!

The problem was in my appid. not sure exactly what was the problem, but changing it solved it.

Related

Is there any way to get the 206px version of a photo via the Facebook Graph API?

I'm trying to get version of a photo that FB uses as the background image for album layouts where one side is always exactly 206px and the other one at least the same, for example https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-xpa1/v/t1.0-9/p206x206/10401476_409218399235620_1454525834273554679_n.jpg?oh=eda59fce63113796b35c46cc4bec162a&oe=55760EFD&gda=1433681435_6b4729404e05493108c271a50c753d7f I've scoured both the graph and SO, but am having absolutely no luck here. I'm aware that you can get 3 versions of a photo using type=album/thumbnail/normal ie https://graph.facebook.com/409218399235620/picture?type=album (you'd think this one would work, but they probably never updated it to redirect to the new size?). I've tried all kinds of variants of this knowing that the graph documentation is pretty crap, to no avail.
I've also used the Explorer to for example pull up ?fields=images, but it's never one of the listed images there. I've tried using widths, replacing parts of the URL etc. etc. I am running the checks with a valid access_token.
I've pretty much resigned myself to just resizing myself, but given the time I've spent on this, I thought I'd at least put it out there in case someone else has had the same problem, and come up with a solution.

Using masonry.js in facebook app

I currently use masonry plugin in my facebook app. Everything is work well but except one thing, at the first time, the FB.autoGrow don't resize the iframe fast enough. As the result, the layout is broken, and all the items are overlapped as in the picture. Could you please tell me any solution to fix this problem?
I found the answer in github. I have just add these lines of code and it works well.
bufferPx: 10000,
extraScrollPx: 12000,
References:
https://github.com/desandro/masonry/issues/145

Facebook image issue. Could it be cache?

Our website was recently redesigned and since then I have been unable to get the correct image to appear when I choose link.
For instance:
If I post this link:
http://www.horrormovienews.net/article1184.html
It does not show the image of Ethan Hawke as one of the choices for me to post along with this story. I have asked a few other people (co-workers) and some friends who live around the USA, PA, NC, etc. and they can not get that pic as a choice either. One person who lives in MA can see it when he posts a link.
(This happens to every news story in our network of sites since the theme was changed on the sites)
Another bizarre thing is it WILL show the image for this story:
http://www.horrormovienews.net/article1160.html
but not the one at the top of this post.
I have even used the Facebook lint tool about a week ago to try to refresh the cache.
I have tried to many different things to try to fix thing. I changed the image path, the size of the images, etc. Nothing seems to work.
Does anyone have any idea what could be causing it? Any help would be much appreciated.
You need to specify og:image tag. See your results here: http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.horrormovienews.net%2Farticle1184.html
Fix up those warnings and then you should be able to share the link much more consistent.

facebook load xd_proxy.php while scrolling

Hi anyone have idea what's going on with the iframe apps on facebook keep loading the xd_proxy.php? I haven't notice it's a new or existing issue because my apps screen is fix, today, when I change some code,I scrolling the screen with my mouse, and discover that the xd_proxy is loading while scrolling(no matter use mouse wheel, kb arrow, scroll bar..), I search some posts in the google and stack overflow, but with no luck, none of them can solve it, I've try add the channelurl, rearrange the javascript...etc, but no luck, please help, thanks in advance.
This is logged as a bug in Facebook's bug tracker now. Best way to get it fixed is to vote for it!
http://bugs.developers.facebook.net/show_bug.cgi?id=16176
Facebook fixed a bug we have been waiting on in their JS SDK this week so we were planning on switching from the old JS SDK to the new but during final testing came across this as well. Looks like window location is being reported back.
Anyone know if this is new and what exactly it is used for? Can it be disabled? Wonder what this would do to performance across different environments.
This starts happening after FB.init in window.fbAsyncInit is called with de JS SDK. It is passing height and width of the client and scroll as parameters with type canvasPage.update. It might, but I do not know, have something to do with a bug earlier this year when apps in iframes weren't resizing, something like a work around.
I just noticed this today as well, and initially thought it was due to FB.Canvas.setAutoResize() being called surreptitiously, but nope, it seems like scroll has been bound to this update.

issues using facebook iphone api to post image and text

I have been trying to use the facebook iphone api to publish an image and some text from my app (i.e. using FBRequest call:#"facebook.stream.publish" with the appropriate params.
I've found that the behavior is extremely erratic, as it first worked fine when I implemented it, then, completely stopped working (the request would fail and nothing would show up), and now sometimes posts only the text and most of the time posts only the image in a gallery style (returning a failure).
I've read that it's something broken on Facebook's side, however, I see other people's games posting things periodically with images and text and wonder if I might be doing something fundamentally different that is much less reliable or stable. Has anyone encountered such an issue or has more familiarity with this?
It looks like facebook royally screwed anyone who uses stream publish to get images posted. It appears they disabled the ability to put the image you send in your post. Check this bug thread near the June 10th timeframe.
http://developers.facebook.com/show_bug.cgi?id=7345
Short of hosting the image yourself, if anyone knows another way to get such a thing working, it'd be great to hear.
Same here, I implemented iphone based facebook image+text sharing using their own api a few days ago, and behavior went from seemingly ok to erratic and unpredictable.
What really annoys me, is that in the simulator it always seems to work. Have you seen this as well?
(btw I don't actually upload the image to facebook, I just publish the message with a link to the image hosted by myself)
You'd maybe better stick to a simple backend you can fully control yourself. The solution I use for social networks without a (stable) iphone api is to upload the image to my backend, and then just throw in a UIWebView, and let the backend handle all OAuth and publishing stuff. The UIWebView calls back on your app's
-(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
on every page load, which you could use to determine if the request failed, was a success, or entered a waiting state. It's kind of a hack but it is at least as reliable as your backend.
The main advantages are
1) you can fix things when facebook breaks them
2) there are 100s of proven libraries to use
UPDATE: You might want to add to FBStreamDialog.m a check if _session.apiKey is not nil. If it is, then the dictionary will remain empty, and the post will show up an empty screen.
The example code provided by facebook does:
FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease];
see http://wiki.developers.facebook.com/index.php/Facebook_iPhone_SDK
FBDialog's init would then pick up the global session object, but it clearly fails occasionally.
When you manage the session yourself, and use:
[[[FBStreamDialog alloc] initWithSession:self.fb_session] autorelease];
Everything works ok.
There's a bit of confusion between the Facebook API and SDK.
See this answer, instead of stream.publish your meant to use feed, however when that answer was written you had to still use stream.publish, it may have been updated since. Hopefully I've pointed you in the right direction.