Giter Site home page Giter Site logo

Comments (19)

wacheena avatar wacheena commented on April 26, 2024

BTW, I checked to make sure that I requested stream_publish when authorizing...

from facebook-android-sdk.

NetApex avatar NetApex commented on April 26, 2024

I have done the same as wacheena with the same results. I thought I would check here first before I started digging to see if anyone else had the same issue. Apparently not enough people to come up with a solution. I guess I will have to see what I can find and I will report back here if I come up with something.

from facebook-android-sdk.

soneff avatar soneff commented on April 26, 2024

Sorry, this looks like a server-side issue with a lot of apps, impacting the dialog() method with action "steam.publish" (the dialog used in the simple example to make a wall post). I'll ask someone for a fix. In the meantime, access to the rest of the API through the SDK should be unaffected, so you can ignore that part of the simple example app for now and you should be able to make a wall post directly using a POST request -- see the stream example.

Thanks for reporting, and thanks for you patience.

from facebook-android-sdk.

langkins avatar langkins commented on April 26, 2024

i met this problem too

from facebook-android-sdk.

daen avatar daen commented on April 26, 2024

I have the same problem too.

from facebook-android-sdk.

adagli avatar adagli commented on April 26, 2024

I did some basic changes and it works :)

add this function into AsyncFacebookRunner.java

public void requestPOST(String graphPath, Bundle parameters,RequestListener listener) { request(graphPath, parameters, "POST", listener); }

then add this line into Facebook.java

protected static String API_BASE_URL = "https://api.facebook.com/method/";

and change

public String request(String graphPath, Bundle parameters, String httpMethod) throws FileNotFoundException, MalformedURLException, IOException

like this

public String request(String graphPath, Bundle parameters, String httpMethod) throws FileNotFoundException, MalformedURLException, IOException {
parameters.putString("format", "json");
if (isSessionValid()) {
parameters.putString(TOKEN, getAccessToken());
}
String url;
if (httpMethod.equals("POST")) {
url = API_BASE_URL + graphPath;
} else {
url = graphPath != null ? GRAPH_BASE_URL + graphPath : RESTSERVER_URL;
}
return Util.openUrl(url, httpMethod, parameters);
}

and finally remove this line

params.putString("method", method);

from method

public static String openUrl(String url, String method, Bundle params) throws MalformedURLException, IOException

from facebook-android-sdk.

krebchak avatar krebchak commented on April 26, 2024

Having same problem, where do you call the new function requestPOST?

thanks

from facebook-android-sdk.

soneff avatar soneff commented on April 26, 2024

The issue with the Wall Post dialog (API Error Code: 3 ... ) should be fixed how -- let us know if you still have issues with this part of the Example application.

from facebook-android-sdk.

krebchak avatar krebchak commented on April 26, 2024

did you just check in code, because i downloaded this today and am experiencing the same problem with the example?

from facebook-android-sdk.

langkins avatar langkins commented on April 26, 2024

it works fine after do changes following what soneff said.

from facebook-android-sdk.

adagli avatar adagli commented on April 26, 2024

Sorry krebchak.

I forgot it. you can call in Example.java like this:

mPostButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Bundle bundle = new Bundle();
bundle.putString("message", "Lorem ipsum dolor");
// mFacebook.dialog(Example.this, "stream.publish", bundle,
// new SampleDialogListener());
mAsyncRunner.requestPOST("stream.publish", bundle, new WallPostRequestListener());
}
});

from facebook-android-sdk.

Korriged avatar Korriged commented on April 26, 2024

Facebook API changed last week: requests "https://api.facebook.com?method=stream.publish&..." do not work
anymore and are replaced with "https://api.facebook.com/method/stream.publish?...".
-> I've submitted a bug about that on Facebook: http://bugs.developers.facebook.com/show_bug.cgi?id=8660

from facebook-android-sdk.

Korriged avatar Korriged commented on April 26, 2024

I can see that this bug is closed. Does it mean that the code has been updated on GIT?
If yes, on which version?

from facebook-android-sdk.

wacheena avatar wacheena commented on April 26, 2024

@soneff, the update worked well for me. Thanks!
@Korriged, I think this was a server side change. But if it wasn't it's working for me with the latest version from GIT.

from facebook-android-sdk.

Korriged avatar Korriged commented on April 26, 2024

@ wacheena: did you take adagli's correction (see above)?
I did not: I am waiting for a new delivery of the SDK.

Unfortunatly, https://api.facebook.com?method=stream.publish&message=Message&format=json&attachment=%7B%22name%22%3A%22Facebook%22%2C%22href%22%3A%22http%3A%2F%2Fdevelopers.facebook.com%2F%22%2C%22caption%22%3A%22Caption%22%2C%22description%22%3A%22Description%22%7D&access_token=... still does not work for me :(.

But it works when changing to https://api.facebook.com/method/stream.publish?message=Message&format=json&attachment=%7B%22name%22%3A%22Facebook%22%2C%22href%22%3A%22http%3A%2F%2Fdevelopers.facebook.com%2F%22%2C%22caption%22%3A%22Caption%22%2C%22description%22%3A%22Description%22%7D&access_token=...

from facebook-android-sdk.

wacheena avatar wacheena commented on April 26, 2024

No, I didn't incorporate the changes. After the server side changes the example currently in git worked worked for me using an API key from a test app that I created last week. I haven't tried using an API key for my older applications yet.

from facebook-android-sdk.

Korriged avatar Korriged commented on April 26, 2024

@ adagli: I have incorporated your correction and it works fine :).
Thank you for this patch :).

I hope your correction will be incorporated in the SDK soon.

from facebook-android-sdk.

dbhasin avatar dbhasin commented on April 26, 2024

I want to use the links.preview and links.post publishing methods using the sdk. When will be able to do that? Also is there any other method instead of using the sdk that I could include those options in my android application.

from facebook-android-sdk.

soneff avatar soneff commented on April 26, 2024

dbhasin, can you open this a separate issue? this thread is unrelated / closed...

from facebook-android-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.