You can use Bond JS SDK to connect with a profile.
// bondHub is an authenticated
const profileId = '1';
const referralResult = await bondHub.referredBy(profileId)
console.log(`referralResult transaction is relayed by proxy id: {referralResult.txHash}`)
// bondHub is an authenticated
const handle = 'yourHandleName';
const followResult = await bondHub.follow(profileId)
console.log(`followResult transaction is relayed by proxy id: {followResult.txHash}`)