The "p1" and "p2" parameters are the object ID and connection name. Everything in Facebook has an ID and some have an alias. For example, my ID is 738140579 and my alias is "habuma". Also, the authenticated user also has an alias of "me" as a convenience. As for the connection name, that kinda depends on what you're trying to do. Each object has a different set of connections, depending on its type. But it sounds like you want to post to the "feed" connection.
So, if you want to post that image and message to the authenticated user's wall, you could pass in "me" and "feed". You'll need to have publish_stream permission to do this.
The JavaDocs for GraphApi don't include the details on this...it'd be quite a lengthy bit of JavaDoc if I had to list out all of the connection names. And then I'd need to go into details on what connections are available for the various object types. Since this API is a lower-level API, it is assumed that the developer is already somewhat familiar with Facebook's Graph API, so I didn't document the details here. But I suppose it might be a good idea to include a link to Facebook's documentation at https://developers.facebook.com/docs/reference/api/ in the JavaDoc.
Spring Social Project Lead