func (m *Messenger) GetProfile(userID string) (*Profile, error) {
	resp, err := m.doRequest("GET", fmt.Sprintf(GraphAPI+"/v2.6/%s?fields=first_name,last_name,profile_pic,locale,timezone,gender", userID), nil)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	read, err := ioutil.ReadAll(resp.Body)
	if resp.StatusCode != http.StatusOK {
		er := new(rawError)
		json.Unmarshal(read, er)
		return nil, errors.New("Error occured: " + er.Error.Message)
	}
	profile := new(Profile)
	return profile, json.Unmarshal(read, profile)
}
func (m *Messenger) GetProfile(userID string) (*Profile, error) {
	resp, err := m.doRequest("GET", fmt.Sprintf(GraphAPI+"/v2.6/%s?fields=first_name,last_name,profile_pic,locale,timezone,gender", userID), nil)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	read, err := ioutil.ReadAll(resp.Body)
	if resp.StatusCode != http.StatusOK {
		er := new(rawError)
		json.Unmarshal(read, er)
		return nil, errors.New("Error occured: " + er.Error.Message)
	}
	profile := new(Profile)
	return profile, json.Unmarshal(read, profile)
}
func ( m * Messenger ) GetProfile ( userID string ) ( * Profile , error ) { resp , err := m . doRequest ( " " , fmt . Sprintf ( GraphAPI + " " , userID ) , nil ) if err != nil { return nil , err } defer resp . Body . Close ( ) read , err := ioutil . ReadAll ( resp . Body ) if resp . StatusCode != http . StatusOK { er := new ( rawError ) json . Unmarshal ( read , er ) return nil , errors . New ( " " + er . Error . Message ) } profile := new ( Profile ) return profile , json . Unmarshal ( read , profile ) }
// GetProfile fetches the recipient's profile from facebook platform
// Non empty UserID has to be specified in order to receive the information
GetProfile fetches the recipient s profile from facebook platform Non empty UserID has to be specified in order to receive the information