dandelionmood/php-lastfm

Object of class stdClass could not be converted to string

Closed this issue · 5 comments

Hi there,
I get an error if i caalling this below.
It's in this file dandelionmood/lastfm/lib/Dandelionmood/LastFm/LastFm.php line 161

    $lastfm = new \Dandelionmood\LastFm\LastFm(env("LASTFM_APIKEY"), env("LASTFM_APISECRET"));
    $tracks = $lastfm->track_getSimilar(
        array(
            'artist' => 'Robbie Williams,
            'track' => 'Feel',
            'limit' => 50,
            'autocorrect' => '1',
        )
    );

Maybe this can be fixed here?

Hi @simonfranz,
can you give me more detail about the error you see ?
What is the content of $json when you have a problem ?

Pierre

thanks for the quick response.

"{"error":3,"message":"Invalid Method - No method with that name in this package"}"

it seems that lastfm has removed this method from their api, despite that it's still listed on the api-docs.
I cannot get any content from this link http://www.last.fm/api/show/track.getSimilar

Sorry for the inconvinience

Thanks for the heads up @simonfranz, good luck with your project :) !

thanks you too, for this awesome package. It's really helping shortening the development-time :)