post image on Facebook wall and facebook friends wall

I am very tired with the problems of API, like Facebook Graph API, weather API etc.

I've used both API in my project. Graph API for Facebook and Google weather API for weather, but now on time of project completion, both API are not working. Google weather API depreciated in November,

And the Facebook features I've been using (post image on wall and post image on friend wall) were working last day, but now they don't.

The problem is that when I log in, I get the message The page you requested is not Found and below a link to go back to the previous page.

And when i click the link "back to previous page" it shows message:

An error has occurred with AppName, please try again
API error code : 100
API error Description : Invalid Parameter
Error_message : cancel_URL URL is not properly formatted

I wants to know solution of Facebook API. Is this problem is with every developer? if API modified or changed what we can do regarding?

Answers


How long ago did you update your facebook API? About two weeks ago I had to remove my entire API, redownload, and change all the posting code my app was using. It stopped working entirely and had no idea until app users complained. Some necessary changes for the new facebook API:

Facebook recommends putting these in your appDelegate if you look at the newest sample apps.

    #import <FacebookSDK/FacebookSDK.h>

     - (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI {
        NSArray *permissions = [NSArray arrayWithObjects:@"publish_actions", nil];
                return [FBSession openActiveSessionWithPermissions:permissions
                                                      allowLoginUI:allowLoginUI
                                                 completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {
     if(state==513){
                   //facebook usage has been approved
                   }
                   }];
            }    

     - (BOOL)application:(UIApplication *)application
                        openURL:(NSURL *)url
              sourceApplication:(NSString *)sourceApplication
                     annotation:(id)annotation {
                // We need to handle URLs by passing them to FBSession in order for SSO authentication
                // to work.
                return [FBSession.activeSession handleOpenURL:url];
            }

And whereever you want to make your post put something like this:

    if(facebookEnabled==YES)
    {

     NSString *fbText=[NSString stringWithFormat:@"whatever text you want to post";

            [FBRequestConnection startForPostStatusUpdate:fbText
                                        completionHandler:^(FBRequestConnection *connection, id result, NSError *error) 
{
                                                                                    }];
    }

Let me know if you have questions. Hope it helps!


Need Your Help

Nginx: X-Accel-Redirect not working in files with know MIME extension

php nginx mime-types x-sendfile x-accel-redirect

I am developing a webapp and X-Accel-Redirect header works fine only in files without extension. For some reason, if I add an extension to the file name the X-Accel-Redirect doesn't work.

ASP .NET DetailsView Control ObjectDataSource Parameterized Select Issue

c# asp.net objectdatasource detailsview

I'm using a GridView and Details View and my datasource is a custom ObjectDataSource that returns a dataset.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.