How do I add Facebook OpenGraph meta tags for attachments in the header for a custom theme?

$attachment_id is simply the numerical ID assigned to any media you have uploaded. You can write:

echo wp_get_attachment_image('1','large');

to display the large size of image attachment with ID of 1.

You should setup a new query to get all of the attachment IDs associated with the current post, then you can

get_posts('post_type=attachment')

Check this example and modify the li’s to become the meta property declaration instead: codex.wordpress.org/Function_Reference/wp_get_attachment_image#Display_all_images_as_a_list

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)