Automatically send Friend Request to users that join

7 views
Skip to first unread message

Greg

unread,
Nov 12, 2009, 5:06:49 PM11/12/09
to Google Friend Connect Developer Forum
I want to send a Friend Request to users when they join my site to add
me as a friend, is there any way to do this. I've searched all over,
and can't find any way to do it, is this possible?

I think it is a message that is sent to the user, but I can't find the
info in the API for how to create and send this message.

Resseguie

unread,
Nov 12, 2009, 5:25:11 PM11/12/09
to Google Friend Connect Developer Forum
Greg, I don't have the answer, but I'm interested in the same
capability. Like Tom is (was?) on MySpace.

I don't want new users to log in and not know where to get started.
Having at least 1-2 people in your network automatically (or at least
suggested up front) goes a long way in pointing users in the right
direction.

Good discussion on this topic here: (second half of the post)
http://bokardo.com/archives/behavior-first-design-second/

Bob Aman

unread,
Nov 12, 2009, 6:14:02 PM11/12/09
to google-friend-co...@googlegroups.com
This is one of those areas where the potential for malicious activity
is significant. Currently this is not something we support as a
result.

-Bob Aman

Greg

unread,
Nov 12, 2009, 6:50:38 PM11/12/09
to Google Friend Connect Developer Forum
All I want to do is send them a friend request - not automatically add
them as a friend - just send the request. Where is the problem with
that?
If I can't send the request can I at least display a pop-up with the
Add as Friend link and my profile with a message for them?

Bob Aman

unread,
Nov 12, 2009, 7:07:01 PM11/12/09
to google-friend-co...@googlegroups.com
> All I want to do is send them a friend request - not automatically add
> them as a friend - just send the request.  Where is the problem with
> that?

Most operations that the site owner can do, another user can do as if
they were the site owner. If you allow friend requests via the API, a
user could automatically send friend requests to every single member
of your community. Potentially to every single GFC user on every
single GFC site. No doubt we'd notice and ban them, but that's still
not something we're keen to have someone attempt.

> If I can't send the request can I at least display a pop-up with the
> Add as Friend link and my profile with a message for them?

Not... really. The closest I think you can come is to automatically
display your profile. However, this will appear in a Lightbox, and
won't give you an opportunity to tell the user why you are displaying
your profile to them.

-Bob Aman

qwallis

unread,
Nov 13, 2009, 3:43:46 AM11/13/09
to Google Friend Connect Developer Forum
1. Make sure that you optimize text and links presented to a user when
they join. Admittedly many people won't read the info but keeping a
small call to action "Read how to get the most from joining this
community" and linking that to a page which introduces the site /
owner and encouraging them to subscribe to the newsletter, send a
friend request.

2. Send a friend request (after you are notified of a new member) and
send a support message with clear intent. They may not respond but it
also gives them email (use, one relevant to the site e.g.
ad...@mydomain.com), so everything ties together.

Pat Hawks

unread,
Nov 17, 2009, 1:47:53 AM11/17/09
to Google Friend Connect Developer Forum
http://www.opensocial.org/Technical-Resources/opensocial-spec-v081/rpc-protocol
2.6 Creating a friend relationship to another user.

This example maps to PUTing an opensocial.Person object /people/@me/
@friends with the RESTful API. This example is a use-case not covered
by the OpenSocial JS API and is given here to show how additional
operations that a container may want to support can be defined within
this framework. This effect of this call may be different based on how
the container models the social graph. This may be interpreted as send
an invite to the specified person to create a bi-drection friend
relationship which may be accepted or rejected later. Depending on the
semantics of the group the result of the call can vary and the person
added may not be immediately visible in a subsequent person.get call
on the same group.

Notes:
The return value on success is VOID, represented by an empty JSON
structure.
userId & groupId could be omitted as they match the operation default.
Shown for completeness
URL addressable equivalent is
http://api.example.org/rpc?method=people.create&id=createFriend&userId=@me&groupId=@friends&person.id=example.org:FF256337

POST /rpc HTTP/1.1
Host: api.example.org
Authorization: <auth token>
Content-Type: application/json
{
"method" : "people.create",
"id" : "createFriend"
"params: {
"userId" : "@me",
"groupId" : "@friends",
"person" : {
"id" : "example.org:FF256337"
}
}
}

HTTP/1.x 207 Multi-Status
Content-Type: application/json
{
"result" : {
}
}

Bob Aman

unread,
Nov 17, 2009, 1:04:40 PM11/17/09
to google-friend-co...@googlegroups.com
> This example maps to PUTing an opensocial.Person object /people/@me/
> @friends with the RESTful API. This example is a use-case not covered
> by the OpenSocial JS API and is given here to show how additional
> operations that a container may want to support can be defined within
> this framework.

I'm not entirely sure I follow what you're saying: Are you saying
that doing this will result in a friend request being sent in GFC or
are you suggesting that this is a potential way of implementing it?

-Bob
Reply all
Reply to author
Forward
0 new messages